Forráskód Böngészése

- prevent Perl from picking up stuff in /usr/local on FreeBSD and NetBSD - cleanup packaging a little bit

Ralf S. Engelschall 23 éve
szülő
commit
52043abb68
1 módosított fájl, 19 hozzáadás és 11 törlés
  1. 19 11
      perl/perl.spec

+ 19 - 11
perl/perl.spec

@@ -33,18 +33,18 @@ Distribution: OpenPKG [CORE]
 Group:        Language
 License:      GPL/Artistic
 Version:      5.8.0
-Release:      20021219
+Release:      20021231
 
 #   list of sources
-Source0:      ftp://ftp.cpan.org/pub/CPAN/src/%{name}-%{version}.tar.gz
+Source0:      ftp://ftp.cpan.org/pub/CPAN/src/perl-%{version}.tar.gz
 Source1:      perl-openpkg.sh
 Patch0:       perl.patch
 
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20020206, gcc
-PreReq:       OpenPKG, openpkg >= 20020206, gcc
+BuildPreReq:  OpenPKG, openpkg >= 20021230, gcc
+PreReq:       OpenPKG, openpkg >= 20021230, gcc
 AutoReq:      no
 AutoReqProv:  no
 
@@ -62,19 +62,24 @@ AutoReqProv:  no
     chmod -R u+w .
 
 %build
-    #   Remove bind, db, gdbm and iconv from optional library checks
-    %{l_shtool} subst -e 's;\(.*for thislib in $libswanted.*\);libswanted=`echo " $libswanted " | sed -e "s/ bind / /g" -e "s/ db / /g" -e "s/ gdbm / /g" -e "s/ iconv / /g"`\; \1;' Configure 
-
     #   configure the Perl package
-    %{l_shtool} subst -e 's;package=perl5;package=perl;' Configure
+    %{l_shtool} subst \
+        -e 's;\(.*for thislib in $libswanted.*\);libswanted=`echo " $libswanted " | sed -e "s/ bind / /g" -e "s/ db / /g" -e "s/ gdbm / /g" -e "s/ iconv / /g"`\; \1;' \
+        -e 's;package=perl5;package=perl;' \
+        Configure
+    %{l_shtool} subst \
+        -e 's; */usr/local/lib;;' \
+        hints/freebsd.sh hints/netbsd.sh
     ./Configure \
         -d -e -s \
         -Dprefix=%{l_prefix} \
         -Dinstallprefix=$RPM_BUILD_ROOT%{l_prefix} \
         -Dcc="%{l_cc}" -Doptimize="%{l_cflags -O}" \
         -Dlocincpth="%{l_prefix}/include" \
+        -Dloclibpth="%{l_prefix}/lib" \
         -Dldflags="-L%{l_prefix}/lib" \
         -Dlibpth="%{l_prefix}/lib /lib /usr/lib /usr/ccs/lib" \
+        -Dglibpth="%{l_prefix}/lib /lib /usr/lib /usr/ccs/lib" \
         -Uinstallusrbinperl \
         -Ui_malloc -Ui_iconv -Ui_db
 
@@ -99,7 +104,8 @@ AutoReqProv:  no
 
     #   install OpenPKG utility for Perl module packages
     %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
-        %{SOURCE perl-openpkg.sh} $RPM_BUILD_ROOT%{l_prefix}/bin/perl-openpkg
+        %{SOURCE perl-openpkg.sh} \
+        $RPM_BUILD_ROOT%{l_prefix}/bin/perl-openpkg
 
     #   post-adjustments to installation tree
     rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl%{version}
@@ -109,8 +115,10 @@ AutoReqProv:  no
     $RPM_BUILD_ROOT%{l_prefix}/bin/perl -pi.orig \
         -e "s:$RPM_BUILD_ROOT%{l_prefix}:%{l_prefix}:g" \
         $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/*/Config.pm \
-        `find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/ -type f -name ".packlist" -print`
-    find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/ -name "*.orig" -print | xargs rm -f
+        `find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/ \
+              -type f -name ".packlist" -print`
+    find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/ \
+         -name "*.orig" -print | xargs rm -f
 
     #   strip binary files
     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2> /dev/null || true