فهرست منبع

remove dependency to binutils tools size(1) and strip(1)

Thomas Lotterer 20 سال پیش
والد
کامیت
e25c656b87
3فایلهای تغییر یافته به همراه30 افزوده شده و 12 حذف شده
  1. 5 2
      bash/bash.spec
  2. 2 1
      openpkg/HISTORY
  3. 23 9
      openpkg/openpkg.spec

+ 5 - 2
bash/bash.spec

@@ -39,7 +39,7 @@ Class:        CORE
 Group:        Shell
 License:      GPL
 Version:      %{V_base_real}.%{V_plvl_raw}
-Release:      20041111
+Release:      20050727
 
 #   list of sources
 Source0:      ftp://ftp.cwru.edu/pub/bash/bash-%{V_base_real}.tar.gz
@@ -98,6 +98,9 @@ AutoReqProv:  no
     %{l_shtool} subst \
         -e 's;@l_openpkg_release@;%{l_openpkg_release};' \
         version.c
+    %{l_shtool} subst \
+        -e 's;\(size $(Program)\);\1 || true;' \
+        Makefile.in
 
 %build
     #   configure package
@@ -142,7 +145,7 @@ AutoReqProv:  no
     rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
     rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/bashbug.1
     rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/bashbug
-    strip $RPM_BUILD_ROOT%{l_prefix}/bin/bash
+    strip $RPM_BUILD_ROOT%{l_prefix}/bin/bash || true
 
     #   install global configuration
     %{l_shtool} mkdir -f -p -m 755 \

+ 2 - 1
openpkg/HISTORY

@@ -2,7 +2,8 @@
 2005
 ====
 
-20050727 added to rpmtool the detetection for "number of CPUs" under AIX for "make -j"
+20050727 remove dependency to binutils tools size(1) and strip(1)
+20050727 added to rpmtool the detection for "number of CPUs" under AIX for "make -j"
 
 20050726 **** RELEASE AS PART OF OPENPKG 2.4.2 ***
 20050726 Cosmetics in "openpkg rpm --help" output

+ 23 - 9
openpkg/openpkg.spec

@@ -582,6 +582,10 @@ Provides:     OpenPKG
 
     #   build GNU bash tool
     ( cd bash-%{V_bash}
+      #   remove dependency to size(1) during bash build
+      sh $shtool subst \
+          -e 's;\(size $(Program)\);\1 || true;' \
+          Makefile.in
       ( #   force disabled wide-character support
         echo "ac_cv_header_wchar_h=no"
         echo "ac_cv_header_wctype_h=no"
@@ -844,8 +848,18 @@ Provides:     OpenPKG
     #   display verbosity header
     set +x; VERBOSE "INSTALL: Stripping Down Installation"; set -x
 
+    #   manually make sure strip(1) is available or use a null replacement
+    l_strip=""; [ ".%{?l_strip:set}" = .set ] && l_strip="%{l_strip}"; export l_strip
+    if [ ".$l_strip" = . ]; then
+        l_strip=`sh $shtool path strip`
+        if [ ".$l_strip" = . ]; then
+            echo "openpkg: prerequisite tool \`strip' not found - using null replacement"
+            l_strip="echo"
+        fi
+    fi
+
     #   strip RPM installation
-    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* \
+    ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/bin/* \
           $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/* >/dev/null 2>&1 || true
     for dir in man/ja man/pl man/ru man/sk src; do
         rm -rf $RPM_BUILD_ROOT%{l_prefix}/$dir >/dev/null 2>&1 || true
@@ -965,35 +979,35 @@ Provides:     OpenPKG
     #   install RPM extension
     ( cd rpm-%{V_rpm}
       cp file/file $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/file
-      strip $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/file
+      ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/file
     ) || exit $?
     ( cd curl-%{V_curl}
       cp src/curl $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/curl
-      strip $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/curl
+      ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/curl
     ) || exit $?
     ( cd bzip2-%{V_bzip2}
       cp bzip2 $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/bzip2
-      strip $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/bzip2
+      ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/bzip2
     ) || exit $?
     ( cd gzip-%{V_gzip}
       cp gzip $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/gzip
-      strip $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/gzip
+      ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/gzip
     ) || exit $?
     ( cd patch-%{V_patch}
       cp patch $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/patch
-      strip $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/patch
+      ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/patch
     ) || exit $?
     ( cd tar-%{V_tar}
       cp tar $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/tar
-      strip $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/tar
+      ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/tar
     ) || exit $?
     ( cd bash-%{V_bash}
       cp bash $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/bash
-      strip $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/bash
+      ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/bash
     ) || exit $?
     ( cd uuid-%{V_uuid}
       cp uuid $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/uuid
-      strip $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/uuid
+      ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/uuid
     ) || exit $?
     sed -e "s;@l_prefix@;%{l_prefix};g" \
         -e "s;@l_musr@;%{l_musr};g" \