You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
219 lines
9.4 KiB
219 lines
9.4 KiB
## |
|
## perl.spec -- OpenPKG RPM Specification |
|
## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH |
|
## Copyright (c) 2000-2001 The OpenPKG Project <http://www.openpkg.org/> |
|
## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# package information |
|
Name: perl |
|
Summary: Practical Extraction and Reporting Language |
|
URL: http://www.perl.com/ |
|
Vendor: The Perl Project |
|
Packager: The OpenPKG Project |
|
Distribution: OpenPKG [REL] |
|
Group: Language |
|
License: Artistic or GPL |
|
Version: 5.6.1 |
|
Release: 20011201.0 |
|
|
|
# list of sources |
|
Source0: ftp://ftp.cpan.org/CPAN/src/%{name}-%{version}.tar.gz |
|
Source1: http://www.cpan.org/modules/by-module/CGI/CGI.pm-3.02.tar.gz |
|
Source2: http://www.cpan.org/modules/by-module/Bit/Bit-Vector-6.1.tar.gz |
|
Source3: http://www.cpan.org/modules/by-module/Date/TimeDate-1.10.tar.gz |
|
Source4: http://www.cpan.org/modules/by-module/Date/DateManip-5.40.tar.gz |
|
Source5: http://www.cpan.org/modules/by-module/Config/Config-IniFiles-2.21.tar.gz |
|
Source6: http://www.cpan.org/modules/by-module/Parse/Parse-RecDescent-1.80.tar.gz |
|
Source7: http://www.cpan.org/modules/by-module/HTML/HTML-Parser-3.25.tar.gz |
|
Source8: http://www.cpan.org/modules/by-module/Net/Net-Daemon-0.36.tar.gz |
|
Source9: http://www.cpan.org/modules/by-module/Net/Net-Server-0.81.tar.gz |
|
Source10: http://www.cpan.org/modules/by-module/Net/Net-ext-0.932.tar.gz |
|
Source11: http://www.cpan.org/modules/by-module/Net/libnet-1.0704.tar.gz |
|
Source12: http://www.cpan.org/modules/by-module/URI/URI-1.17.tar.gz |
|
Source13: http://www.cpan.org/modules/by-module/Unix/Syslog-0.96.tar.gz |
|
Source14: http://www.cpan.org/modules/by-module/Time/Time-HiRes-01.20.tar.gz |
|
Source15: http://www.cpan.org/modules/by-module/MIME/MIME-tools-5.411.tar.gz |
|
Source16: http://www.cpan.org/modules/by-module/MIME/MIME-Base64-2.12.tar.gz |
|
Source17: http://www.cpan.org/modules/by-module/Digest/Digest-MD5-2.16.tar.gz |
|
Source18: http://www.cpan.org/modules/by-module/WWW/libwww-perl-5.62.tar.gz |
|
Source19: http://www.cpan.org/modules/by-module/Image/Image-Info-1.08.tar.gz |
|
Source20: http://www.cpan.org/modules/by-module/Alias/Alias-2.32.tar.gz |
|
Source21: http://www.cpan.org/modules/by-module/Archive/Archive-Tar-0.22.tar.gz |
|
Source22: http://www.cpan.org/modules/by-module/Expect/Expect-1.12.tar.gz |
|
Source23: http://www.cpan.org/modules/by-module/IPC/IPC-Shareable-0.60.tar.gz |
|
Source24: http://www.cpan.org/modules/by-module/Image/Image-Size-2.96.tar.gz |
|
Source25: http://www.cpan.org/modules/by-module/Inline/Inline-0.43.tar.gz |
|
Source26: http://www.cpan.org/modules/by-module/Mail/Mail-Sendmail-0.78.tar.gz |
|
Source27: http://www.cpan.org/modules/by-module/Set/Set-Scalar-1.16.tar.gz |
|
Source28: http://www.cpan.org/modules/by-module/Mail/MailTools-1.41.tar.gz |
|
Source29: http://www.cpan.org/modules/by-module/Date/Date-Calc-5.0.tar.gz |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20011126.0, gcc, gzip |
|
PreReq: OpenPKG, openpkg >= 20011126.0 |
|
AutoReq: no |
|
AutoReqProv: no |
|
|
|
%description |
|
Perl ("Practical Reporting and Extraction Language") is a very |
|
sophisticated and flexible (but this way also complex) programming |
|
language. This is the original implementation of the Perl 5 interpreter |
|
from Larry Wall and his community. |
|
|
|
%prep |
|
%setup -q |
|
|
|
%build |
|
# Eval hack for obsolete Linux versions (like Debian 2.2) with too old |
|
# bintutils where our GCC 3.0 makes trouble on Perl loading DSO based modules. |
|
# In order to avoid having to require the user to update to binutils 2.11, |
|
# we have to force Perl to use the system-supplied compiler... :-( |
|
cc="%{l_cc}" |
|
cflags="%{l_cflags -O}" |
|
case "%{l_target}" in |
|
*-linux* ) |
|
v=unknown |
|
if [ -f /etc/debian_version ]; then |
|
v=`/usr/bin/dpkg -l binutils | grep binutils | awk '{ print $3; }'` |
|
elif [ -f /etc/redhat-release ]; then |
|
v=`/bin/rpm -q --qf '%{VERSION}' binutils` |
|
else |
|
v=`(rpm -q --qf '%{VERSION}' binutils) 2>/dev/null` |
|
fi |
|
case "$v" in |
|
2.1[1-9].* ) ;; |
|
* ) cc=`%{l_shtool} path -p/bin:/usr/bin:$PATH cc`; cflags="-O" ;; |
|
esac |
|
;; |
|
esac |
|
|
|
# configure the Perl package |
|
./Configure \ |
|
-d -e -s \ |
|
-Dprefix=%{l_prefix} \ |
|
-Dinstallprefix=$RPM_BUILD_ROOT%{l_prefix} \ |
|
-Dcc="$cc" -Doptimize="$cflags" \ |
|
-Dlocincpth="%{l_prefix}/include" \ |
|
-Dldflags="-L%{l_prefix}/lib" \ |
|
-Dlibpth="%{l_prefix}/lib /lib /usr/lib /usr/ccs/lib" \ |
|
-Uinstallusrbinperl |
|
|
|
# build the Perl package |
|
%{l_make} %{l_mflags -O} -f Makefile |
|
|
|
%install |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
# install the Perl package via standard procedure |
|
%{l_make} %{l_mflags} -f Makefile install |
|
|
|
# post-adjustments to installation tree |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl%{version} |
|
|
|
# re-adjust configuration for installation of modules |
|
$RPM_BUILD_ROOT%{l_prefix}/bin/perl \ |
|
-pi.orig \ |
|
-e "s:([\"'])%{l_prefix}/lib:\$1$RPM_BUILD_ROOT%{l_prefix}/lib:g;" \ |
|
-e "s:([\"'])%{l_prefix}([\"']):\$1$RPM_BUILD_ROOT%{l_prefix}\$2:g;" \ |
|
$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version}/*/Config.pm |
|
|
|
# create a wrapper script which finds the includes |
|
eval `grep "^archname=" $RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version}/*/Config.pm` |
|
perl=$RPM_BUILD_ROOT/perl |
|
echo "#!/bin/sh" >$perl |
|
echo "exec $RPM_BUILD_ROOT%{l_prefix}/bin/perl \\" >>$perl |
|
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version} \\" >>$perl |
|
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version}/${archname} \\" >>$perl |
|
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl |
|
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/%{version} \\" >>$perl |
|
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/%{version}/${archname} \\" >>$perl |
|
echo " \"\$@\"" >>$perl |
|
chmod a+x $perl |
|
|
|
# add additional third-party modules |
|
rm -rf $RPM_BUILD_DIR/%{name}-%{version}-modules |
|
mkdir $RPM_BUILD_DIR/%{name}-%{version}-modules |
|
cd $RPM_BUILD_DIR/%{name}-%{version}-modules |
|
for mod in \ |
|
CGI.pm-3.02.tar.gz \ |
|
Bit-Vector-6.1.tar.gz \ |
|
Set-Scalar-1.16.tar.gz \ |
|
TimeDate-1.10.tar.gz \ |
|
DateManip-5.40.tar.gz \ |
|
Config-IniFiles-2.21.tar.gz \ |
|
Parse-RecDescent-1.80.tar.gz \ |
|
Net-Daemon-0.36.tar.gz \ |
|
Net-Server-0.81.tar.gz \ |
|
Net-ext-0.932.tar.gz \ |
|
libnet-1.0704.tar.gz \ |
|
Syslog-0.96.tar.gz \ |
|
Time-HiRes-01.20.tar.gz \ |
|
Digest-MD5-2.16.tar.gz \ |
|
HTML-Parser-3.25.tar.gz \ |
|
URI-1.17.tar.gz \ |
|
MIME-tools-5.411.tar.gz \ |
|
MIME-Base64-2.12.tar.gz \ |
|
libwww-perl-5.62.tar.gz \ |
|
Image-Info-1.08.tar.gz \ |
|
Image-Size-2.96.tar.gz \ |
|
Alias-2.32.tar.gz \ |
|
Archive-Tar-0.22.tar.gz \ |
|
Expect-1.12.tar.gz \ |
|
IPC-Shareable-0.60.tar.gz \ |
|
Inline-0.43.tar.gz \ |
|
Mail-Sendmail-0.78.tar.gz \ |
|
MailTools-1.41.tar.gz \ |
|
Date-Calc-5.0.tar.gz; \ |
|
do |
|
%{l_gzip} -dc $RPM_SOURCE_DIR/$mod | %{l_tar} xf - |
|
dir=`echo "$mod" | sed -e 's;\.tar\.gz$;;'` |
|
cd $dir |
|
chmod -R u+rw . |
|
cp Makefile.PL Makefile.PL.orig |
|
sed -e "s:\$^X:'$perl':g" <Makefile.PL.orig >Makefile.PL |
|
$perl Makefile.PL PREFIX="$RPM_BUILD_ROOT%{l_prefix}" PERL=$perl FULLPERL=$perl </dev/null |
|
%{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all |
|
%{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install |
|
cd .. |
|
done |
|
cd $RPM_BUILD_DIR |
|
|
|
# re-adjust configuration as mentioned in Perl's INSTALL document |
|
$perl -pi.orig -e "s:$RPM_BUILD_ROOT%{l_prefix}:%{l_prefix}:g" \ |
|
$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version}/*/Config.pm \ |
|
`find $RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version}/ -type f -name ".packlist" -print` |
|
find $RPM_BUILD_ROOT%{l_prefix}/lib/perl5/ -name "*.orig" -print | xargs rm -f |
|
|
|
# strip binary files |
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2> /dev/null || true |
|
|
|
# determine installed files |
|
%{l_rpmtool} files -v -o$RPM_BUILD_DIR/perl-%{version}/files -r$RPM_BUILD_ROOT %{l_files_std} |
|
|
|
%files -f files |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
rm -rf $RPM_BUILD_DIR/%{name}-%{version}-modules |
|
|
|
|