perl/perl.spec

506 lines
17 KiB
RPMSpec
Raw Permalink Normal View History

%define threading 1
%define MAJver %(echo %version | cut -d. -f1)
%if %threading
%define thread_arch -thread-multi
%else
%define thread_arch %{nil}
%endif
%if "%{_host_cpu}" == "i586"
%define perl_host i386
%else
%define perl_host %{_host_cpu}
%endif
%if "%{_build_cpu}" == "i586"
%define perl_build i386
%else
%define perl_build %{_build_cpu}
%endif
%define full_arch %{perl_host}-%{_os}%{thread_arch}
# don't change to %{_libdir} as perl is clean and has arch-dependent subdirs
%define perl_root %{_prefix}/lib/perl5
# Bootstrap build (no first stage deps):
# rpm -ba --define='bootstrap 1' perl.spec
Name: perl
Version: 5.24.4
Release: 6mamba
Epoch: 2
Summary: Practical Extraction and Report Language
Group: Development/Libraries/Perl
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.perl.com
Source: http://www.cpan.org/src/%{MAJver}.0/perl-%{version}.tar.gz
Source1: macros.perl
Patch0: %{name}-5.10.1-norootcheck.patch
Patch1: %{name}-5.8.7-can_2005_0448.patch
Patch2: %{name}-5.8.7-can_2005_3962.patch
Patch3: %{name}-5.8.8-fix_makedepend.patch
Patch4: %{name}-5.8.8-can_2007_5116.patch
Patch5: %{name}-5.10.1-cross_compile.patch
License: GPL, Artistic
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libdb53-devel
BuildRequires: libgdbm-devel
## AUTOBUILDREQ-END
BuildRequires: sed >= 4.1.4
BuildRequires: man-db
%if "%{?bootstrap}" != "1"
BuildRequires: libgdbm-devel >= 1.8.3
Requires: libgdbm >= 1.8.3
%endif
Provides: perl-base
Provides: perl(getopts.pl)
Provides: perl(ctime.pl)
Provides: perl(flush.pl)
Provides: perl(find.pl)
Provides: perl(bigint.pl)
Provides: perl(timelocal.pl)
#Provides: perl(attributes)
#Provides: perl(fields)
#Provides: perl(locale)
#Provides: perl(subs)
Provides: perl(Carp::Heavy)
Obsoletes: perl-Test-Builder-Tester
Provides: perl-Archive-Tar
Obsoletes: perl-Archive-Tar < 2:5.24
#Provides: perl-Module-Build
#Obsoletes: perl-Module-Build
Provides: perl-Pod-Escapes
Obsoletes: perl-Pod-Escapes < 2:5.24
Provides: perl-Pod-Simple
Obsoletes: perl-Pod-Simple < 2:5.24
Provides: perl-version
Obsoletes: perl-version < 2:5.24
Provides: perl-ExtUtils-CBuilder
Obsoletes: perl-ExtUtils-CBuilder < 2:5.24
Provides: perl-IO-Compress-Base
Obsoletes: perl-IO-Compress-Base < 2:5.24
Provides: perl-Compress-Raw-Zlib
Obsoletes: perl-Compress-Raw-Zlib < 2:5.24
Provides: perl-IO-Compress-Zlib
Obsoletes: perl-IO-Compress-Zlib < 2:5.24
Provides: perl-Compress-Zlib
Obsoletes: perl-Compress-Zlib < 2:5.24
Provides: perl-IO-Compress-Bzip2
Obsoletes: perl-IO-Compress-Bzip2 < 2:5.24
Provides: perl-Compress-Raw-Bzip2
Obsoletes: perl-Compress-Raw-Bzip2 < 2:5.24
Provides: perl-IO-Zlib
Obsoletes: perl-IO-Zlib < 2:5.24
Provides: perl-IO-Socket-IP
Obsoletes: perl-IO-Socket-IP < 2:5.24
Provides: perl-Test-Tester
Obsoletes: perl-Test-Tester < 2:5.24
Provides: perl-Test-Builder-Tester
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description
Perl is a high-level programming language with roots in C, sed, awk and shell scripting.
Perl is good at handling processes and files, and is especially good at handling text.
Perl's hallmarks are practicality and efficiency.
While it is used to do a lot of different things, Perl's most common applications (and what it excels at) are probably system administration utilities and web programming.
A large proportion of the CGI scripts on the web are written in Perl.
You need the perl package installed on your system so that your system can handle Perl scripts.
%package -n lib%{name}
Group: System/Libraries
Summary: Shared library and architecture dependent modules for %{name}
%description -n lib%{name}
This package contains shared library and architecture dependent modules for %{name}.
%package -n perl-devel
Summary: Static libraries and header for %{name}
Group: Development/Libraries/Perl
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n perl-devel
Perl is a high-level programming language with roots in C, sed, awk and shell scripting.
Perl is good at handling processes and files, and is especially good at handling text.
Perl's hallmarks are practicality and efficiency.
While it is used to do a lot of different things, Perl's most common applications (and what it excels at) are probably system administration utilities and web programming.
A large proportion of the CGI scripts on the web are written in Perl.
You need the perl package installed on your system so that your system can handle Perl scripts.
This is the devel package for perl.
%debug_package
%prep
%setup -q
%global __requires_exclude ^perl\\(
#:<< _EOF
## Warning: don't replace perl with %{name} below
#% define __perl_requires %{_builddir}/perl-%{version}/perl_requires.sh
## don't require any perl module
#cat > perl_requires.sh << _EOF
##! /bin/sh
#%{_prefix}/lib/rpm/find-requires %{buildroot} %{_target_cpu} | grep -v "perl" | grep -v "^$"
#_EOF
#
#chmod +x perl_requires.sh
%build
#%if "%{_host}" != "%{_build}"
## unrepoducible ugly hacks to cross-compile perl
#%{_build}-gcc -DPERL_CORE -c -fexpensive-optimizations -fomit-frame-pointer -O2 -std=c89 -O2 \
#-fomit-frame-pointer -pipe -Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels \
#-Wc++-compat -o generate_uudmap.o -fexpensive-optimizations -fomit-frame-pointer -O2 generate_uudmap.c
#cd Cross
#make patch
#make perl OS="%{_target_vendor}-%{_target_os}%{?_gnu}" HOSTCC="%{_build}-gcc" || {
#cd ..
##mv lib/auto/File/Glob/Glob.so lib/auto/File/Glob/Glob.so.arm
#cp %{_libdir}/perl5/%{version}/%{perl_build}-linux-thread-multi/auto/File/Glob/Glob.so lib/auto/File/Glob/Glob.so
#make more2 more3 more4
#}
#%else
sh Configure -des \
-Darchname=%{perl_host}-%{_os} \
-Dcc='%{_host}-gcc' \
-Doptimize="%{optflags}" \
-Dprefix=%{_prefix} \
-Dvendorprefix=%{_prefix} \
-Dsiteprefix=%{_prefix} \
-Dman3ext=3pm \
-Dcf_by=openmamba \
-Dmyhostname=localhost \
-Dperladmin=root@localhost \
-Ud_csh=undef \
-Duseshrplib \
-Dinstallprefix=%{buildroot}%{_prefix} \
%if %threading
-Dusethreads
%endif
# -Dinc_version_list="5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0"
make lib/Config.pm
./configure.gnu --prefix=%{_prefix}
make
%if "%{_host}" == "%{build}"
make test
%endif
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
#mv -f lib/Config.pm lib/Config.pm.orig
#mv -f lib/Config.pm.4install lib/Config.pm
make install
#% if "%{_host}" != "%{_build}"
#chmod +w %{buildroot}%{_libdir}/perl5/%{version}/%{perl_host}-linux-thread-multi/auto/File/Glob/Glob.so
#cp lib/auto/File/Glob/Glob.so.%{perl_host} %{buildroot}%{_libdir}/perl5/%{version}/%{perl_host}-linux-thread-multi/auto/File/Glob/Glob.so
#chmod -w %{buildroot}%{_libdir}/perl5/%{version}/%{perl_host}-linux-thread-multi/auto/File/Glob/Glob.so
#% endif
find %{buildroot} -type f -name ".packlist" | xargs -r rm -f
#mv -f lib/Config.pm lib/Config.pm.4install
#mv -f lib/Config.pm.orig lib/Config.pm
cp -f lib/Config.pm %{buildroot}%{perl_root}/%{version}/%{full_arch}/Config.pm
(cd %{buildroot}
find usr/ -type f -not -name *.h -and -not -name *.a -printf "/%p\n" | \
grep 'perl5/' > %{_tmppath}/perl-mainpkg
find usr/ -type f -name *.h -printf "/%p\n" -or -name *.a -printf "/%p\n" | \
grep "perl5/" > %{_tmppath}/perl-develpkg
)
# add libperl.so symlink in /usr/lib
%ifarch x86_64 aarch64
install -d %{buildroot}%{_libdir}
%endif
ln -s %{perl_root}/%{version}/%{full_arch}/CORE/libperl.so %{buildroot}%{_libdir}
ln -sf perl5 %{buildroot}%{_bindir}/perl
ln -sf perl%{version} %{buildroot}%{_bindir}/perl5
## added sperl link to sperl%{version}
#ln -s /usr/bin/sperl%{version} %{buildroot}/usr/bin/sperl
# strip 'buildroot' paths from perl configuration files
for f in Config.pm Config_heavy.pl CORE/config.h; do
sed -i "s,%{buildroot},,g" \
%{buildroot}/usr/lib/perl5/%{version}/%{perl_host}-%{_os}-thread-multi/$f
done
# Provide legacy /usr/bin/perl5.24.0 symlink
if [ "%{version}" == 5.24.4 ]; then
ln -s perl%{version} %{buildroot}%{_bindir}/perl5.24.0
fi
install -D -m0644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.perl
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
rm %{_tmppath}/{perl-mainpkg,perl-develpkg}
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
%files -f %{_tmppath}/perl-mainpkg
%defattr(-,root,root)
#%{_bindir}/a2p
#%{_bindir}/config_data
%{_bindir}/corelist
%{_bindir}/cpan
#%{_bindir}/cpan2dist
#%{_bindir}/cpanp
#%{_bindir}/cpanp-run-perl
%{_bindir}/encguess
#%{_bindir}/find2perl
%{_bindir}/instmodsh
%{_bindir}/json_pp
%{_bindir}/perl
%{_bindir}/perl5
%{_bindir}/perl5.24.0
%{_bindir}/perl%{version}
%{_bindir}/perlbug
%{_bindir}/perldoc
%{_bindir}/perlivp
%{_bindir}/perlthanks
%{_bindir}/pod2html
#%{_bindir}/pod2latex
%{_bindir}/pod2man
%{_bindir}/pod2text
%{_bindir}/prove
#%{_bindir}/psed
%{_bindir}/ptar
%{_bindir}/ptardiff
%{_bindir}/ptargrep
#%{_bindir}/s2p
%{_bindir}/shasum
#%{_bindir}/sperl
#%attr(4711,root,root) %{_bindir}/sperl%{version}
%{_bindir}/splain
%{_bindir}/zipdetails
#%{_bindir}/suidperl
%{_libdir}/libperl.so
%{_rpmmacrodir}/macros.perl
%dir %{perl_root}
#% if "%{_host_cpu}" == "%{_build_cpu}"
%{_mandir}/man?/*
#% endif
%exclude %{_prefix}/lib/perl5/%{version}/%{perl_host}-%{_os}-thread-multi
%files -n libperl
%defattr(-,root,root)
%{_libdir}/libperl.so
%dir %{_prefix}/lib/perl5/%{version}/%{perl_host}-%{_os}-thread-multi
%{_prefix}/lib/perl5/%{version}/%{perl_host}-%{_os}-thread-multi/*
%doc Artistic AUTHORS
%files -n perl-devel -f %{_tmppath}/perl-develpkg
%defattr(-,root,root)
%{_bindir}/c2ph
#%{_bindir}/dprofpp
%{_bindir}/enc2xs
%{_bindir}/h2ph
%{_bindir}/h2xs
%{_bindir}/libnetcfg
#%{_bindir}/perlcc
%{_bindir}/piconv
%{_bindir}/pl2pm
%{_bindir}/pod2usage
%{_bindir}/podchecker
%{_bindir}/podselect
%{_bindir}/pstruct
%{_bindir}/xsubpp
%doc Changes README
%changelog
* Mon Mar 08 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 5.24.4-6mamba
- update macros.perl with missing required definitions
* Mon Mar 08 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 5.24.4-5mamba
- fix macros.perl with rpm 4.16
* Sun Mar 07 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 5.24.4-4mamba
- provide rpm macros.perl removed from rpm 4.16
* Fri Feb 26 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 5.24.4-3mamba
- remove obsolete for perl-Module-Build
* Sun Jan 31 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 5.24.4-2mamba
- provide legacy /usr/bin/perl5.24.0 symlink
* Sat Jan 30 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 5.24.4-1mamba
- update to 5.24.4
* Sat Nov 05 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 5.24.0-2mamba
- backport from perl 5.16.3 in devel: move libperl.so and %{perl_vendor} modules under libperl package
* Tue May 10 2016 Automatic Build System <autodist@mambasoft.it> 5.24.0-1mamba
- automatic version update by autodist
* Sun May 01 2016 Automatic Build System <autodist@mambasoft.it> 5.22.2-1mamba
- automatic version update by autodist
* Mon Dec 14 2015 Automatic Build System <autodist@mambasoft.it> 5.22.1-1mamba
- automatic version update by autodist
* Wed Jul 01 2015 Automatic Build System <autodist@mambasoft.it> 5.22.0-1mamba
- automatic version update by autodist
* Sun Feb 15 2015 Automatic Build System <autodist@mambasoft.it> 5.20.2-1mamba
- automatic version update by autodist
* Mon Sep 15 2014 Automatic Build System <autodist@mambasoft.it> 5.20.1-1mamba
- automatic version update by autodist
* Sat Jun 07 2014 Automatic Build System <autodist@mambasoft.it> 5.20.0-1mamba
- automatic version update by autodist
* Tue Jan 14 2014 Automatic Build System <autodist@mambasoft.it> 5.18.2-1mamba
- automatic version update by autodist
* Tue Aug 13 2013 Automatic Build System <autodist@mambasoft.it> 5.18.1-1mamba
- automatic version update by autodist
* Sun May 19 2013 Automatic Build System <autodist@mambasoft.it> 5.18.0-1mamba
- automatic version update by autodist
* Mon Mar 18 2013 Automatic Build System <autodist@mambasoft.it> 5.16.3-1mamba
- update to 5.16.3
* Fri Nov 02 2012 Automatic Build System <autodist@mambasoft.it> 5.16.2-1mamba
- automatic version update by autodist
* Thu Aug 09 2012 Automatic Build System <autodist@mambasoft.it> 5.16.1-1mamba
- automatic version update by autodist
* Wed May 23 2012 Automatic Build System <autodist@mambasoft.it> 5.16.0-1mamba
- automatic version update by autodist
* Tue Sep 27 2011 Automatic Build System <autodist@mambasoft.it> 5.14.2-1mamba
- automatic version update by autodist
* Fri Jun 17 2011 Automatic Build System <autodist@mambasoft.it> 5.14.1-1mamba
- automatic update by autodist
* Wed Jun 15 2011 Automatic Build System <autodist@mambasoft.it> 5.14.0-1mamba
- automatic update by autodist
* Tue Jan 25 2011 Automatic Build System <autodist@mambasoft.it> 5.12.3-1mamba
- automatic update by autodist
* Wed Sep 08 2010 Automatic Build System <autodist@mambasoft.it> 5.12.2-1mamba
- automatic update to 5.12.2 by autodist
* Tue May 18 2010 Automatic Build System <autodist@mambasoft.it> 5.12.1-1mamba
- automatic update to 5.12.1 by autodist
* Mon May 10 2010 Automatic Build System <autodist@mambasoft.it> 5.12.0-1mamba
- automatic update to 5.12.0 by autodist
* Tue Feb 16 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 5.10.1-3mamba
- obsolete perl-CGI
* Thu Oct 01 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 5.10.1-2mamba
- obsolete perl-IO-Compress-Bzip2
* Sat Sep 26 2009 Automatic Build System <autodist@mambasoft.it> 5.10.1-1mamba
- automatic update to 5.10.1 by autodist
* Thu Jun 11 2009 Automatic Build System <autodist@mambasoft.it> 5.10.0-4mamba
- obsolete perl-IO-Zlib
* Wed Jun 10 2009 Automatic Build System <autodist@mambasoft.it> 5.10.0-3mamba
- automatic rebuild by autodist
* Thu Oct 30 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 5.10.0-2mamba
- obsolete packages that have been integrated in this release
* Wed Oct 29 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 5.10.0-1mamba
- automatic update to 5.10.0 by autodist
* Wed Nov 07 2007 Aleph0 <aleph0@openmamba.org> 5.8.8-4mamba
- security fix CVE-2007-5116
* Fri Jun 29 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 5.8.8-3mamba
- add provide for perl(timelocal.pl)
* Wed Mar 28 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 5.8.8-2mamba
- rebuilt with the openmamba toolchain
* Wed Apr 12 2006 Davide Madrisan <davide.madrisan@qilinux.it> 5.8.8-1qilnx
- update to version 5.8.8 by autospec
- obsoletes perl-Test-Builder-Tester
* Tue Jan 17 2006 Davide Madrisan <davide.madrisan@qilinux.it> 5.8.7-4qilnx
- security fix: CAN-2005-3962 (qibug#86)
* Wed Jan 11 2006 Davide Madrisan <davide.madrisan@qilinux.it> 5.8.7-3qilnx
- fixed requirement for the devel package
- fixed license
* Tue Jun 07 2005 Davide Madrisan <davide.madrisan@qilinux.it> 5.8.7-2qilnx
- fixed user/group for sperl binary
- added license, readme and changelog files
- don't require perl in specfile to allow bootstrap builds
- fixes and cleanups for other archs build
* Mon Jun 06 2005 Davide Madrisan <davide.madrisan@qilinux.it> 5.8.7-1qilnx
- update to version 5.8.7 by autospec
- also solves a pair of exploits in suidperl involving debugging code
- updated patch for security issue can-2005-0448
- disable root check to let non-root packagers create perl rpms
- strip 'buildroot' paths from 'Config_heavy.pl'
* Mon May 02 2005 Davide Madrisan <davide.madrisan@qilinux.it> 5.8.6-3qilnx
- security fix QSA-2005-058 (CAN-2005-0448)
- provides 'perl(find.pl)'
- strip %%buildroot paths from perl configuration files
- added sperl symlink
* Tue Jan 25 2005 Davide Madrisan <davide.madrisan@qilinux.it> 5.8.6-2qilnx
- fix architecture compatilibity problems with previous release
- removed `.packlist'
* Wed Jan 19 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 5.8.6-1qilnx
- update to version 5.8.6 by autospec
- epoch set to 2, removed provides for perl = 0:5.008 and perl = 1:5
- added libperl.so symlink in /usr/lib
* Mon Nov 22 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 5.8.5-2qilnx
- add manually provides for perl(Carp::Heavy)
* Mon Jul 26 2004 Davide Madrisan <davide.madrisan@qilinux.it> 5.8.5-1qilnx
- update to 5.8.5
* Fri May 07 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 5.8.3-2qilnx
- db4 build requirement added
* Mon Apr 05 2004 Davide Madrisan <davide.madrisan@qilinux.it> 5.8.3-1qilnx
- new version rebuild
* Wed Jan 07 2004 Davide Madrisan <davide.madrisan@qilinux.it> 5.8.2-1qilnx
- rebuilt with Perl version 5.8.2
- provides -- removed: getopts.pl
- added: perl = 0:5.008, perl = 1:5 requirements
* Mon Apr 28 2003 Mirko Cortillaro <mirko.cortillaro@qinet.it>
- added perl-base provide
* Thu Apr 17 2003 Mirko Cortillaro <mirko.cortillaro@qinet.it>
- removed Prefix definition
* Wed Apr 16 2003 Mirko Cortillaro <mirko.cortillaro@qinet.it>
- modified file list package perl-devel
* Mon Apr 14 2003 Mirko Cortillaro <mirko.cortillaro@qinet.it>
- modified file list
* Thu Apr 10 2003 Mirko Cortillaro <mirko.cortillaro@qinet.it>
- write a spec file for perl