Explorar o código

upgrade to latest Yum version. Submitted by: skaar <skaar@waste.org>

Ralf S. Engelschall %!s(int64=20) %!d(string=hai) anos
pai
achega
637e9ca118
Modificáronse 1 ficheiros con 17 adicións e 30 borrados
  1. 17 30
      yum/yum.spec

+ 17 - 30
yum/yum.spec

@@ -22,12 +22,8 @@
 ##  SUCH DAMAGE.
 ##
 
-#   FIXME MSvB: builds well but breaks at runtime due to
-#   FIXME MSvB: missing python dependencies as indicated in
-#   FIXME MSvB: %{l_prefix}/lib/python/site-packages/yum/__init__.py
-
 #   package version
-%define       V_yum_major  2.2
+%define       V_yum_major  2.4
 %define       V_yum_minor  2
 
 #   package information
@@ -41,7 +37,7 @@ Class:        EVAL
 Group:        Bootstrapping
 License:      GPL
 Version:      %{V_yum_major}.%{V_yum_minor}
-Release:      20050801
+Release:      20060222
 
 #   list of sources
 Source0:      http://linux.duke.edu/projects/yum/download/%{V_yum_major}/yum-%{version}.tar.gz
@@ -55,15 +51,15 @@ AutoReq:      no
 AutoReqProv:  no
 
 %description
-    Yum is a utility that can check for and automatically download and
-    install updated RPM packages. Dependencies are obtained and downloaded
-    automatically prompting the user as necessary.
+    Yum is a utility that can check for and automatically download
+    and install updated RPM packages. Dependencies are obtained and
+    downloaded automatically prompting the user as necessary.
 
 %track
     prog yum = {
         version   = %{version}
         url       = http://linux.duke.edu/projects/yum/download/
-        regex     = (2\.2)
+        regex     = (%{V_yum_major})
         url       = http://linux.duke.edu/projects/yum/download/__NEWVER__/
         regex     = yum-(__VER__)\.tar\.gz
     }
@@ -71,38 +67,29 @@ AutoReqProv:  no
 %prep
     %setup -q
     %{l_shtool} subst \
-        -e 's;\(mkdir -p \)\(\$(DESTDIR)/usr/share/man/man\){5,8};\1\2-5 \2-8;g' \
-        -e 's;man-\([0-9]\);man\1;g' \
-        docs/Makefile
-    %{l_shtool} subst \
-        -e 's;\(DESTDIR[})/\]]*\);\1%{l_prefix};g' \
-        docs/Makefile \
-        etc/Makefile \
-        Makefile
+        -e 's;\(DESTDIR[})/\]]*\)/usr;\1%{l_prefix};g' \
+        -e 's;\(DESTDIR[})/\]]*\)/etc;\1%{l_prefix}/etc/yum;g' \
+        -e 's;/share/yum-cli;/lib/python/site-packages/yum-cli;g' \
+        -e 's;/share/man;/man;g' \
+        docs/Makefile etc/Makefile Makefile
     %{l_shtool} subst \
-        -e 's;\(DESTDIR=`cd \$(DESTDIR)\)/cw\(\; pwd`\);\1\2;g' \
-        Makefile
+        -e 's;$(PYVER);;g' \
+        yum/Makefile rpmUtils/Makefile repomd/Makefile
     %{l_shtool} subst \
         -e 's;^#!/usr/bin/python;#!%{l_prefix}/bin/python;' \
         `find . -name "*.py" -print` \
         bin/yum-arch
-    %{l_shtool} subst \
-        -e 's;/usr/share;%{l_prefix}/share;g' \
-        -e 's;share/yum-cli;share/yum;g' \
-        bin/* \
-        *.pyc \
-        *.py
 
 %build
     %{l_make} %{l_mflags -O}
 
 %install
     rm -rf $RPM_BUILD_ROOT
-    %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/lib
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/lib \
+        $RPM_BUILD_ROOT%{l_prefix}/man/man5 \
+        $RPM_BUILD_ROOT%{l_prefix}/man/man8
     %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
-    ( cd $RPM_BUILD_ROOT%{l_prefix}/usr && mv bin share .. ) || exit $?
-    rmdir $RPM_BUILD_ROOT%{l_prefix}/usr
-    ( cd $RPM_BUILD_ROOT%{l_prefix}/share && mv yum-cli yum ) || exit $?
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
 
 %files -f files