SHA256
3
0
forked from pool/perl
perl/perl.spec

380 lines
14 KiB
RPMSpec

#
# spec file for package perl (Version 5.10.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# icecream 0
Name: perl
Summary: The Perl interpreter
Version: 5.10.1
Release: 69
License: Artistic License .. ; GPL v2 or later
Group: Development/Languages/Perl
AutoReqProv: on
Url: http://www.perl.org/
Source: perl-%{version}.tar.bz2
Source1: %name-rpmlintrc
Source2: macros.perl
Source3: README.macros
Patch0: perl-%{version}.dif
Patch1: perl-gracefull-net-ftp.diff
Patch2: perl-fix_dbmclose_call.patch
Patch3: perl-regexp-refoverflow.diff
Patch4: perl-nroff.diff
Patch5: perl-netcmdutf8.diff
Patch6: perl-threads.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: perl-base = %version
#PreReq: %fillup_prereq
BuildRequires: db-devel gdbm-devel ncurses-devel zlib-devel
#Requires: gzip # needed in SuSEconfig.perl
Recommends: perl-doc = %version
#
Provides: perl-500
Provides: perl-macros
Obsoletes: perl-macros
Provides: perl-Filter-Simple perl-I18N-LangTags perl-MIME-Base64 perl-Storable perl-Test-Simple
Obsoletes: perl-Filter-Simple perl-I18N-LangTags perl-MIME-Base64 perl-Storable perl-Test-Simple
Provides: perl-Text-Balanced perl-Time-HiRes perl-libnet
Obsoletes: perl-Text-Balanced perl-Time-HiRes perl-libnet
Provides: perl-Compress-Zlib perl-Compress-Raw-Zlib
Obsoletes: perl-Compress-Zlib perl-Compress-Raw-Zlib
Provides: perl-IO-Zlib perl-IO-Compress-Base perl-IO-Compress-Zlib
Obsoletes: perl-IO-Zlib perl-IO-Compress-Base perl-IO-Compress-Zlib
Provides: perl-Archive-Tar perl-Module-Build
Obsoletes: perl-Archive-Tar perl-Module-Build
Provides: perl-Locale-Maketext-Simple perl-Module-Pluggable
Obsoletes: perl-Locale-Maketext-Simple perl-Module-Pluggable
Provides: perl-Pod-Escapes perl-Pod-Simple
Obsoletes: perl-Pod-Escapes perl-Pod-Simple
Provides: perl-version perl-ExtUtils-ParseXS
Obsoletes: perl-version perl-ExtUtils-ParseXS
%description
perl - Practical Extraction and Report Language
Perl is optimized for scanning arbitrary text files, extracting
information from those text files, and printing reports based on that
information. It is also good for many system management tasks. Perl is
intended to be practical (easy to use, efficient, and complete) rather
than beautiful (tiny, elegant, and minimal).
Some of the modules available on CPAN can be found in the "perl"
series.
Authors:
--------
Larry Wall, Louis J. LaBash, Jr. <llabash@siue.edu>
%package base
License: Artistic License .. ; GPL v2 or later
Group: Development/Languages/Perl
Summary: The Perl interpreter
Provides: perl-Digest perl-Digest-MD5
# bug437293
%ifarch ppc64
Obsoletes: perl-64bit
%endif
#
%description base
perl - Practical Extraction and Report Language
Perl is optimized for scanning arbitrary text files, extracting
information from those text files, and printing reports based on that
information. It is also good for many system management tasks.
Perl is intended to be practical (easy to use, efficient, and complete)
rather than beautiful (tiny, elegant, and minimal).
This package contains only some basic modules and the perl binary
itself.
Authors:
--------
Larry Wall, Louis J. LaBash, Jr. <llabash@siue.edu>
%package doc
License: Artistic License .. ; GPL v2 or later
Group: Development/Languages/Perl
Summary: Perl Documentation
Requires: perl = %{version}
Provides: perl:/usr/share/man/man3/CORE.3pm.gz
%description doc
Perl man pages and pod files.
Authors:
--------
Larry Wall, Louis J. LaBash, Jr. <llabash@siue.edu>
%prep
%setup -q -n perl-5.10.1
cp -p %{S:3} .
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%build
export SUSE_ASNEEDED=0
export BZIP2_LIB=%{_libdir}
export BZIP2_INCLUDE=%{_includedir}
export BUILD_BZIP2=0
options="-Doptimize='$RPM_OPT_FLAGS -Wall -pipe'"
%ifarch alpha
# -mieee needed for bad alpha gcc optimization
options="-Doptimize='$RPM_OPT_FLAGS -Wall -pipe -mieee'"
%endif
%ifarch ppc ppc64
options="$options -Duse64bitint"
%endif
# always use glibc's setenv
options="$options -Accflags='-DPERL_USE_SAFE_PUTENV'"
chmod 755 ./configure.gnu
./configure.gnu --prefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=\'true\' $options
make
mv libperl.so savelibperl.so
mv lib/Config.pm saveConfig.pm
mv lib/Config_heavy.pl saveConfig_heavy.pl
make clobber
./configure.gnu --prefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm $options
make
%ifnarch %arm
%check
export SUSE_ASNEEDED=0
# delete broken File::Find test
rm -f lib/File/Find/t/find.t
# delete racy test
rm -f t/op/getppid.t
make test
%endif
%install
make install DESTDIR=$RPM_BUILD_ROOT
cp -a $RPM_BUILD_ROOT/usr/lib/perl5/site_perl $RPM_BUILD_ROOT/usr/lib/perl5/vendor_perl
cpa=`echo $RPM_BUILD_ROOT/usr/lib/perl5/*/*/CORE | sed -e 's@/CORE$@@'`
cp=`echo "$cpa" | sed -e 's@/[^/]*$@@'`
vpa=`echo $cpa | sed -e 's@/perl5/@/perl5/vendor_perl/@'`
vp=`echo "$vpa" | sed -e 's@/[^/]*$@@'`
install -d $vp/auto
install -d $vpa/auto
install -m 555 savelibperl.so $cpa/CORE/libperl.so
install -m 444 saveConfig.pm $cpa/Config.pm
install -m 444 saveConfig_heavy.pl $cpa/Config_heavy.pl
#install -d $RPM_BUILD_ROOT/var/adm/SuSEconfig/bin
#install -d $RPM_BUILD_ROOT/sbin/conf.d
#install -d $RPM_BUILD_ROOT/var/adm/fillup-templates
#install -m 755 SuSE/perllocal.SuSE $RPM_BUILD_ROOT/usr/lib/perl5
#install -m 755 SuSE/SuSEconfig.perl $RPM_BUILD_ROOT/sbin/conf.d
#install -m 755 SuSE/sysconfig.suseconfig-perl $RPM_BUILD_ROOT/var/adm/fillup-templates
# install macros.perl file
install -D -m 644 %{S:2} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.perl
pushd /usr/include
( rpm -ql glibc-devel | fgrep '.h'
find /usr/include/asm/ -name \*.h
find /usr/include/asm-generic -name \*.h
) | while read f; do
$RPM_BUILD_ROOT/usr/bin/perl -I$cp -I$cpa $RPM_BUILD_ROOT/usr/bin/h2ph -d $vpa ${f/\/usr\/include\//} || :
done
popd
d="`gcc -print-file-name=include`"
test -f "$d/stdarg.h" && (cd $d ; $RPM_BUILD_ROOT/usr/bin/perl -I$cp -I$cpa $RPM_BUILD_ROOT/usr/bin/h2ph -d $vpa stdarg.h stddef.h float.h)
# remove broken pm - we don't have the module
rm $RPM_BUILD_ROOT/usr/lib/perl5/*/Pod/Perldoc/ToTk.pm
# we don't need this in here
rm $RPM_BUILD_ROOT/usr/lib/perl5/*/*/CORE/libperl.a
#touch $RPM_BUILD_ROOT/usr/share/man/man3/perllocal.3pm
#touch $cpa/perllocal.pod
# test CVE-2007-5116
$RPM_BUILD_ROOT/usr/bin/perl -e '$r=chr(128)."\\x{100}";/$r/'
# test perl-regexp-refoverflow.diff
$RPM_BUILD_ROOT/usr/bin/perl -e '/\6666666666/'
%if 1
# remove unrelated target/os manpages
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlaix.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlamiga.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlapollo.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlbeos.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlbs2000.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlcygwin.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perldgux.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perldos.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlepoc.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlfreebsd.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlhpux.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlhurd.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlirix.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlmachten.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlmacos.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlmacosx.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlmint.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlnetware.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlopenbsd.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlos2.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlos390.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlos400.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlplan9.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlqnx.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlsolaris.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perltru64.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perluts.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlvmesa.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlvms.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlvos.1*
rm $RPM_BUILD_ROOT/usr/share/man/man1/perlwin32.1*
%endif
cat << EOF > perl-base-filelist
/usr/lib/perl5/%version/Carp.pm
/usr/lib/perl5/%version/Carp/
/usr/lib/perl5/%version/Class/
/usr/lib/perl5/%version/Config/
/usr/lib/perl5/%version/Digest.pm
/usr/lib/perl5/%version/Digest/
/usr/lib/perl5/%version/Exporter.pm
/usr/lib/perl5/%version/Exporter/
/usr/lib/perl5/%version/File/
/usr/lib/perl5/%version/Getopt/
/usr/lib/perl5/%version/IPC/
/usr/lib/perl5/%version/Text/
/usr/lib/perl5/%version/Tie/Hash.pm
/usr/lib/perl5/%version/warnings.pm
/usr/lib/perl5/%version/warnings/
/usr/lib/perl5/%version/AutoLoader.pm
/usr/lib/perl5/%version/FileHandle.pm
/usr/lib/perl5/%version/SelectSaver.pm
/usr/lib/perl5/%version/Symbol.pm
/usr/lib/perl5/%version/attributes.pm
/usr/lib/perl5/%version/base.pm
/usr/lib/perl5/%version/bytes.pm
/usr/lib/perl5/%version/bytes_heavy.pl
/usr/lib/perl5/%version/constant.pm
/usr/lib/perl5/%version/fields.pm
/usr/lib/perl5/%version/feature.pm
/usr/lib/perl5/%version/integer.pm
/usr/lib/perl5/%version/locale.pm
/usr/lib/perl5/%version/overload.pm
/usr/lib/perl5/%version/strict.pm
/usr/lib/perl5/%version/utf8.pm
/usr/lib/perl5/%version/utf8_heavy.pl
/usr/lib/perl5/%version/vars.pm
/usr/lib/perl5/%version/version.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/Data/
/usr/lib/perl5/%version/*-linux-thread-multi*/Digest/
/usr/lib/perl5/%version/*-linux-thread-multi*/File/
/usr/lib/perl5/%version/*-linux-thread-multi*/List/
/usr/lib/perl5/%version/*-linux-thread-multi*/Scalar/
/usr/lib/perl5/%version/*-linux-thread-multi*/IO.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/IO/Dir.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/IO/File.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/IO/Handle.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/IO/Pipe.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/IO/Poll.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/IO/Seekable.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/IO/Select.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/IO/Socket.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/IO/Socket/
/usr/lib/perl5/%version/*-linux-thread-multi*/B.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/B/Deparse.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/Config.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/Config_heavy.pl
/usr/lib/perl5/%version/*-linux-thread-multi*/Cwd.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/DynaLoader.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/Errno.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/Fcntl.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/POSIX.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/Socket.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/XSLoader.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/Data/
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/Digest/
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/Fcntl/
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/File/
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/IO/
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/List/
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/Cwd/
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/DynaLoader/
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/Socket/
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/POSIX/POSIX.bs
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/POSIX/POSIX.so
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/POSIX/autosplit.ix
/usr/lib/perl5/%version/*-linux-thread-multi*/auto/POSIX/load_imports.al
/usr/lib/perl5/%version/*-linux-thread-multi*/lib.pm
/usr/lib/perl5/%version/*-linux-thread-multi*/re.pm
EOF
{
sed -e 's/^/%%exclude /' perl-base-filelist
(cd $RPM_BUILD_ROOT
for i in usr/lib/perl5/*/pod/*; do
case $i in */perldiag.pod) ;;
*) echo "%%exclude /$i" ;;
esac
done)
} > perl-base-excludes
#%%post
#%%{fillup_only -an suseconfig}
%files base -f perl-base-filelist
%defattr(-,root,root)
%dir /usr/lib/perl5
%dir /usr/lib/perl5/%version
%dir /usr/lib/perl5/%version/*-linux-thread-multi*
%dir /usr/lib/perl5/%version/*-linux-thread-multi*/auto
%dir /usr/lib/perl5/%version/*-linux-thread-multi*/B
%dir /usr/lib/perl5/%version/*-linux-thread-multi*/auto/POSIX
/usr/bin/perl
/usr/bin/perl%version
/usr/bin/suidperl
%doc /usr/share/man/man1/perl.1.gz
%files -f perl-base-excludes
%defattr(-,root,root)
%exclude /usr/bin/perl
%exclude /usr/bin/perl%version
%exclude /usr/bin/suidperl
%exclude /usr/lib/perl5/*/Unicode/*/*.txt
%exclude /usr/lib/perl5/*/unicore/*.txt
/usr/bin/*
/usr/lib/perl5/*
%config %{_sysconfdir}/rpm/macros.perl
#/sbin/conf.d/SuSEconfig.perl
#/var/adm/fillup-templates/sysconfig.suseconfig-perl
#%ghost /usr/lib/perl*/*/*/perllocal.pod
#%ghost %doc /usr/share/man/man3/perllocal.3pm.gz
%files doc
%defattr(-,root,root)
%doc README.macros
%exclude /usr/share/man/man1/perl.1.gz
%exclude /usr/lib/perl5/*/pod/perldiag.pod
%doc /usr/share/man/man1/*
%doc /usr/share/man/man3/*
%doc /usr/lib/perl5/*/pod
%doc /usr/lib/perl5/*/Unicode/*/*.txt
%doc /usr/lib/perl5/*/unicore/*.txt
%changelog