]> git.pld-linux.org Git - packages/perl.git/blobdiff - perl.spec
- document why no asm-generic on ppc*
[packages/perl.git] / perl.spec
index 6bdf6379a0a38e40fec02e7c2ddf6d9a63864ee7..4c32be90b990f6d3dc09979bb3849d608cce081c 100644 (file)
--- a/perl.spec
+++ b/perl.spec
@@ -24,6 +24,8 @@
 # TODO for perl-dependent packages:
 # - change all "R/BR: perl" to one of perl-{base,modules,devel}
 #
+# NOTE
+# - modules in 5.10.0: http://search.cpan.org/~rgarcia/perl-5.10.0/
 
 %define                abi     5.10.0
 %define                perlthread      %{?with_threads:-thread-multi}
@@ -36,9 +38,9 @@
 %define                perl_vendorarch %{_libdir}/perl5/vendor_perl/%{abi}/%{_target_platform}%{perlthread}
 
 # extract module version from source
-%define                perl_modversion()       %(awk -vp=%1 '$1 == p{m=$1; gsub(/::/, "-", m); printf("perl-%s = %s\\n", m, $3)}END{if (!m) printf("# Error looking up [%s]\\n", p)}'  %{SOURCE3})
+%define                perl_modversion()       %([ -f %{SOURCE3} ] && awk -vp=%1 '$1 == p{m=$1; gsub(/::/, "-", m); printf("perl-%s = %s\\n", m, $3)}END{if (!m) printf("# Error looking up [%s]\\n", p)}' %{SOURCE3} || echo ERROR)
 
-%define                rel     2.2
+%define                rel     4
 Summary:       Practical Extraction and Report Language (Perl)
 Summary(cs.UTF-8):     Programovací jazyk Perl
 Summary(da.UTF-8):     Programmeringssproget Perl
@@ -394,10 +396,8 @@ Provides:  %perl_modversion Digest
 Provides:      %perl_modversion Digest::MD5
 Provides:      %perl_modversion Filter::Simple
 Provides:      %perl_modversion FindBin
-#Provides:     %%perl_modversion Hash::Utils Data::Util is missing
 Provides:      %perl_modversion I18N::LangTags
 Provides:      %perl_modversion IPC::SysV
-#Provides:     %%perl_modversion Locale::Codes
 Provides:      %perl_modversion Locale::Maketext
 Provides:      %perl_modversion MIME::Base64
 Provides:      %perl_modversion Math::BigInt
@@ -407,7 +407,6 @@ Provides:   %perl_modversion Memoize
 Provides:      %perl_modversion NEXT
 Provides:      %perl_modversion Pod::LaTeX
 Provides:      %perl_modversion Pod::Parser
-#Provides:     %%perl_modversion Scalar::List::Utils
 Provides:      %perl_modversion Storable
 Provides:      %perl_modversion Term::ANSIColor
 Provides:      %perl_modversion Term::Cap
@@ -417,8 +416,6 @@ Provides:   %perl_modversion Test::Simple
 Provides:      %perl_modversion Text::Balanced
 Provides:      %perl_modversion Text::ParseWords
 Provides:      %perl_modversion Text::Soundex
-# XXX: I'm not sure what to do with this one...
-#Provides:     %%perl_modversion Text::Tabs+Wrap 2005.0824(01)
 Provides:      %perl_modversion Time::HiRes
 Provides:      %perl_modversion UNIVERSAL
 Provides:      %perl_modversion Unicode::Collate
@@ -656,7 +653,7 @@ sh Configure \
        -Dldflags="%{rpmldflags}" \
        -Dlddlflags="-shared %{rpmldflags}" \
        -Doptimize="%{rpmcflags}" \
-       %{?debug:-DDEBUGGING} \
+       -%{?debug:D}%{!?debug:U}DEBUGGING \
        -Duseshrplib \
        -Dd_dosuid \
        -Dman1dir=%{_mandir}/man1 -Dman1ext=1 \
@@ -734,112 +731,109 @@ if [ ! -f makeinstall.stamp -o ! -d $RPM_BUILD_ROOT ]; then
 fi
 
 if [ ! -f installed.stamp ]; then
-
-%{?with_microperl:install microperl $RPM_BUILD_ROOT%{_bindir}}
-install -d $RPM_BUILD_ROOT%{_mandir}/{ja,ko,zh_CN,zh_TW}/man1
-
-## use symlinks instead of hardlinks
-%{__ln_s} -f perl%{version}    $RPM_BUILD_ROOT%{_bindir}/perl
-%{__ln_s} -f perl%{version}    $RPM_BUILD_ROOT%{_bindir}/suidperl
-%{__ln_s} -f c2ph              $RPM_BUILD_ROOT%{_bindir}/pstruct
-%{__ln_s} -f psed              $RPM_BUILD_ROOT%{_bindir}/s2p
-
-## Fix lib
-%{__rm} $RPM_BUILD_ROOT%{perl_archlib}/CORE/libperl.so
-#%{__ln_s} `%{__perl} -e '$_="'%{perl_archlib}/CORE/libperl.so.%{abi}'";s|^'%{_libdir}'/*||;print'` \
-#      $RPM_BUILD_ROOT%{_libdir}/libperl.so.%{abi}
-mv $RPM_BUILD_ROOT%{perl_archlib}/CORE/libperl.so.%{abi} $RPM_BUILD_ROOT%{_libdir}
-%{__ln_s} ../../../../libperl.so.%{abi} $RPM_BUILD_ROOT%{perl_archlib}/CORE/libperl.so.%{abi}
-%{__ln_s} libperl.so.%{abi} $RPM_BUILD_ROOT%{_libdir}/libperl.so
-# installed as non-executable - let rpm generate deps
-chmod 755 $RPM_BUILD_ROOT%{_libdir}/libperl.so.%{abi}
-
-## Fix Config.pm: remove buildroot path and change man pages extensions
-%{__perl} -pi -e 's,%{buildroot}/*,/,g'                        $RPM_BUILD_ROOT%{perl_archlib}/Config.pm
-%{__perl} -pi -e "s,^man1ext='1',man1ext='1p',"                $RPM_BUILD_ROOT%{perl_archlib}/Config_heavy.pl
-%{__perl} -pi -e "s,^man3ext='3perl',man3ext='3pm',"   $RPM_BUILD_ROOT%{perl_archlib}/Config_heavy.pl
-
-## Generate the *.ph files
-owd=$(pwd)
-cd /usr/include
-H2PH=$RPM_BUILD_ROOT%{_bindir}/h2ph
-PHDIR=$RPM_BUILD_ROOT%{perl_archlib}
-WANTED='
-       syscall.h
-       syslog.h
-       termios.h
-       wait.h
-       asm/termios.h
-       sys/ioctl.h
-       sys/socket.h
-       sys/syscall.h
-       sys/time.h
-       linux/posix_types.h
-       linux/stddef.h
-'
-# why it returns non-zero???
-%{__perl} $H2PH -a -d $PHDIR $WANTED || :
-cd "$owd"
-
-## remove man pages for other operating systems
-%{__rm}        $RPM_BUILD_ROOT%{_mandir}/man1/perl{aix,amiga,apollo,beos,bs2000,ce,cygwin,dgux,dos}* \
-       $RPM_BUILD_ROOT%{_mandir}/man1/perl{freebsd,hpux,machten,macos,mpeix,os2,os390}* \
-       $RPM_BUILD_ROOT%{_mandir}/man1/perl{qnx,solaris,vmesa,vms,vos,win32}*
-
-## symlink perldelta.1.gz -> perlFOOdelta.1.gz
-[ -e $RPM_BUILD_ROOT%{_mandir}/man1/perl%(echo %{version} | tr -d .)delta.1 ] || exit 1
-rm $RPM_BUILD_ROOT%{_mandir}/man1/perldelta.1
-echo ".so perl%(echo %{version} | tr -d .)delta.1" >$RPM_BUILD_ROOT%{_mandir}/man1/perldelta.1
-
-## These File::Spec submodules are for non-Unix systems
-%{__rm} $RPM_BUILD_ROOT%{perl_privlib}/File/Spec/[EMOVW]*.pm
-rm $RPM_BUILD_ROOT%{_mandir}/man3/File::Spec::{Epoc,Mac,OS2,VMS,Win32}.3perl*
-
-## We already have these *.pod files as man pages
-%{__rm} $RPM_BUILD_ROOT%{perl_privlib}/{Encode,Test,Net,Locale{,/Maketext}}/*.pod
-rm $RPM_BUILD_ROOT%{perl_privlib}/pod/a2p.pod
-%{__rm} $RPM_BUILD_ROOT%{perl_privlib}/*.pod
-%{__rm} $RPM_BUILD_ROOT%{perl_archlib}/*.pod
-
-## this object file looks unused; why is it there?
-%{__rm} $RPM_BUILD_ROOT%{perl_archlib}/CORE/sperl.o
-
-install -d doc-base/{Getopt/Long,Switch} \
-       doc-devel/ExtUtils \
-       doc-modules/{Attribute/Handlers,Filter/Simple,I18N/LangTags,Locale/{Codes,Maketext},Memoize,NEXT,Net/Ping,Term/ANSIColor,Test/Simple,Text/{Balanced,TabsWrap},Unicode/Collate,unicore}
-
-# needed only for tests
-%{__rm} $RPM_BUILD_ROOT%{perl_privlib}/Unicode/Collate/keys.txt
-mv -f $RPM_BUILD_ROOT%{perl_privlib}/unicore/ReadMe.txt \
-       doc-modules/unicore
-# source for *.pl
-%{__rm} $RPM_BUILD_ROOT%{perl_privlib}/unicore/{*.txt,mktables}
-# cpan tools, we use rpm instead of cpan for managing packages (some search tool would be nice to have but...)
-%{__rm} $RPM_BUILD_ROOT%{_bindir}/cpan*
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/cpan*
-# others
-%{__rm} $RPM_BUILD_ROOT%{_bindir}/config_data
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/config_data*
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/XS::APItest*
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/XS::Typemap*
-
-## dir tree for other perl modules
-install -d $RPM_BUILD_ROOT{%{perl_vendorlib},%{perl_vendorarch},%{perl_vendorarch}/auto}
-owd=$(pwd)
-
-## non-english man pages
-%{__bzip2} -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
-
-mv -f $RPM_BUILD_ROOT%{_mandir}/man1/perlcn.* $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1
-mv -f $RPM_BUILD_ROOT%{_mandir}/man1/perljp.* $RPM_BUILD_ROOT%{_mandir}/ja/man1
-mv -f $RPM_BUILD_ROOT%{_mandir}/man1/perlko.* $RPM_BUILD_ROOT%{_mandir}/ko/man1
-mv -f $RPM_BUILD_ROOT%{_mandir}/man1/perltw.* $RPM_BUILD_ROOT%{_mandir}/zh_TW/man1
-
-# `perl -MExtUtils::Embed -e ldopts` includes -Wl,--as-needed
-# which is then forced upon anyone embedding perl.
-sed -i -e 's#^\(ld.*=.*\)-Wl,--as-needed\(.*\)#\1 \2#g' $RPM_BUILD_ROOT%{perl_archlib}/Config*.pl
-
-rm -rf $RPM_BUILD_ROOT%{_mandir}/README.perl-non-english-man-pages
+       %{?with_microperl:install microperl $RPM_BUILD_ROOT%{_bindir}}
+       install -d $RPM_BUILD_ROOT%{_mandir}/{ja,ko,zh_CN,zh_TW}/man1
+
+       ## use symlinks instead of hardlinks
+       %{__ln_s} -f perl%{version}     $RPM_BUILD_ROOT%{_bindir}/perl
+       %{__ln_s} -f perl%{version}     $RPM_BUILD_ROOT%{_bindir}/suidperl
+       %{__ln_s} -f c2ph               $RPM_BUILD_ROOT%{_bindir}/pstruct
+       %{__ln_s} -f psed               $RPM_BUILD_ROOT%{_bindir}/s2p
+
+       ## Fix lib
+       %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/CORE/libperl.so
+       mv $RPM_BUILD_ROOT%{perl_archlib}/CORE/libperl.so.%{abi} $RPM_BUILD_ROOT%{_libdir}
+       %{__ln_s} ../../../../libperl.so.%{abi} $RPM_BUILD_ROOT%{perl_archlib}/CORE/libperl.so.%{abi}
+       %{__ln_s} libperl.so.%{abi} $RPM_BUILD_ROOT%{_libdir}/libperl.so
+       # installed as non-executable - let rpm generate deps
+       chmod 755 $RPM_BUILD_ROOT%{_libdir}/libperl.so.%{abi}
+
+       ## Fix Config.pm: remove buildroot path and change man pages extensions
+       %{__perl} -pi -e 's,%{buildroot}/*,/,g'                 $RPM_BUILD_ROOT%{perl_archlib}/Config.pm
+       %{__perl} -pi -e "s,^man1ext='1',man1ext='1p',"         $RPM_BUILD_ROOT%{perl_archlib}/Config_heavy.pl
+       %{__perl} -pi -e "s,^man3ext='3perl',man3ext='3pm',"    $RPM_BUILD_ROOT%{perl_archlib}/Config_heavy.pl
+
+       ## Generate the *.ph files
+       owd=$(pwd)
+       cd /usr/include
+       H2PH=$RPM_BUILD_ROOT%{_bindir}/h2ph
+       PHDIR=$RPM_BUILD_ROOT%{perl_archlib}
+       WANTED='
+               syscall.h
+               syslog.h
+               termios.h
+               wait.h
+               asm/termios.h
+               sys/ioctl.h
+               sys/socket.h
+               sys/syscall.h
+               sys/time.h
+               linux/posix_types.h
+               linux/stddef.h
+       '
+       # why it returns non-zero???
+       %{__perl} $H2PH -a -d $PHDIR $WANTED || :
+       cd "$owd"
+
+       ## remove man pages for other operating systems
+       %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/perl{aix,amiga,apollo,beos,bs2000,ce,cygwin,dgux,dos}* \
+               $RPM_BUILD_ROOT%{_mandir}/man1/perl{freebsd,hpux,machten,macos,mpeix,os2,os390}* \
+               $RPM_BUILD_ROOT%{_mandir}/man1/perl{qnx,solaris,vmesa,vms,vos,win32}*
+
+       ## symlink perldelta.1.gz -> perlFOOdelta.1.gz
+       [ -e $RPM_BUILD_ROOT%{_mandir}/man1/perl%(echo %{version} | tr -d .)delta.1 ] || exit 1
+       rm $RPM_BUILD_ROOT%{_mandir}/man1/perldelta.1
+       echo ".so perl%(echo %{version} | tr -d .)delta.1" >$RPM_BUILD_ROOT%{_mandir}/man1/perldelta.1
+
+       ## These File::Spec submodules are for non-Unix systems
+       %{__rm} $RPM_BUILD_ROOT%{perl_privlib}/File/Spec/[EMOVW]*.pm
+       rm $RPM_BUILD_ROOT%{_mandir}/man3/File::Spec::{Epoc,Mac,OS2,VMS,Win32}.3perl*
+
+       ## We already have these *.pod files as man pages
+       %{__rm} $RPM_BUILD_ROOT%{perl_privlib}/{Encode,Test,Net,Locale{,/Maketext}}/*.pod
+       rm $RPM_BUILD_ROOT%{perl_privlib}/pod/a2p.pod
+       %{__rm} $RPM_BUILD_ROOT%{perl_privlib}/*.pod
+       %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/*.pod
+
+       ## this object file looks unused; why is it there?
+       %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/CORE/sperl.o
+
+       install -d doc-base/{Getopt/Long,Switch} \
+               doc-devel/ExtUtils \
+               doc-modules/{Attribute/Handlers,Filter/Simple,I18N/LangTags,Locale/{Codes,Maketext},Memoize,NEXT,Net/Ping,Term/ANSIColor,Test/Simple,Text/{Balanced,TabsWrap},Unicode/Collate,unicore}
+
+       # needed only for tests
+       %{__rm} $RPM_BUILD_ROOT%{perl_privlib}/Unicode/Collate/keys.txt
+       mv -f $RPM_BUILD_ROOT%{perl_privlib}/unicore/ReadMe.txt \
+               doc-modules/unicore
+       # source for *.pl
+       %{__rm} $RPM_BUILD_ROOT%{perl_privlib}/unicore/{*.txt,mktables}
+       # cpan tools, we use rpm instead of cpan for managing packages (some search tool would be nice to have but...)
+       %{__rm} $RPM_BUILD_ROOT%{_bindir}/cpan*
+       %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/cpan*
+       # others
+       %{__rm} $RPM_BUILD_ROOT%{_bindir}/config_data
+       %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/config_data*
+       %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/XS::APItest*
+       %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/XS::Typemap*
+
+       ## dir tree for other perl modules
+       install -d $RPM_BUILD_ROOT{%{perl_vendorlib},%{perl_vendorarch},%{perl_vendorarch}/auto}
+       owd=$(pwd)
+
+       ## non-english man pages
+       %{__bzip2} -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
+
+       mv -f $RPM_BUILD_ROOT%{_mandir}/man1/perlcn.* $RPM_BUILD_ROOT%{_mandir}/zh_CN/man1
+       mv -f $RPM_BUILD_ROOT%{_mandir}/man1/perljp.* $RPM_BUILD_ROOT%{_mandir}/ja/man1
+       mv -f $RPM_BUILD_ROOT%{_mandir}/man1/perlko.* $RPM_BUILD_ROOT%{_mandir}/ko/man1
+       mv -f $RPM_BUILD_ROOT%{_mandir}/man1/perltw.* $RPM_BUILD_ROOT%{_mandir}/zh_TW/man1
+
+       # `perl -MExtUtils::Embed -e ldopts` includes -Wl,--as-needed
+       # which is then forced upon anyone embedding perl.
+       sed -i -e 's#^\(ld.*=.*\)-Wl,--as-needed\(.*\)#\1 \2#g' $RPM_BUILD_ROOT%{perl_archlib}/Config*.pl
+
+       rm -rf $RPM_BUILD_ROOT%{_mandir}/README.perl-non-english-man-pages
 
        touch installed.stamp
 fi
@@ -1185,7 +1179,10 @@ rm -rf $RPM_BUILD_ROOT
 ## *.ph files (could be made a separate package, but an autohelper's support is needed)
 %{perl_archlib}/*.ph
 %{perl_archlib}/asm
+%ifnarch ppc ppc64
+# powerpc asm/ioctl.h doesn't use asm-generic
 %{perl_archlib}/asm-generic
+%endif
 %ifarch sparc64
 %{perl_archlib}/asm-sparc
 %{perl_archlib}/asm-sparc64
This page took 0.055689 seconds and 4 git commands to generate.