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.
189 lines
8.2 KiB
189 lines
8.2 KiB
24 years ago
|
##
|
||
|
## perl.spec -- OpenPKG RPM Specification
|
||
|
## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
|
||
|
## 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
|
||
|
Group: Language
|
||
|
URL: http://www.perl.com/
|
||
|
Vendor: The Perl Project
|
||
|
Packager: rse@openpkg.org
|
||
|
Distribution: OpenPKG
|
||
|
License: Artistic or GPL
|
||
|
Version: 5.6.1
|
||
|
Release: 10
|
||
|
|
||
|
# 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.0.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.19.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.35.tar.gz
|
||
|
Source9: http://www.cpan.org/modules/by-module/Net/Net-Server-0.75.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.0703.tar.gz
|
||
|
Source12: http://www.cpan.org/modules/by-module/URI/URI-1.12.tar.gz
|
||
|
Source13: http://www.cpan.org/modules/by-module/Unix/Syslog-0.95.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.13.tar.gz
|
||
|
Source18: http://www.cpan.org/modules/by-module/WWW/libwww-perl-5.53.tar.gz
|
||
|
Source19: http://www.cpan.org/modules/by-module/Image/Image-Info-1.07.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.11.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.93.tar.gz
|
||
|
Source25: http://www.cpan.org/modules/by-module/Inline/Inline-0.42.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.09.tar.gz
|
||
|
Source28: http://www.cpan.org/modules/by-module/Mail/MailTools-1.15.tar.gz
|
||
|
Source29: http://www.cpan.org/modules/by-module/Date/Date-Calc-4.3.tar.gz
|
||
|
|
||
|
# build information
|
||
|
Prefix: %{l_prefix}
|
||
|
BuildRoot: %{l_buildroot}
|
||
|
BuildPreReq: OpenPKG, openpkg >= 0.9-30, gcc, gzip
|
||
|
PreReq: OpenPKG, openpkg >= 0.9-30
|
||
|
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
|
||
|
./Configure \
|
||
|
-d -e -s \
|
||
|
-Dprefix=%{l_prefix} \
|
||
|
-Dinstallprefix=$RPM_BUILD_ROOT%{l_prefix} \
|
||
|
-Dcc="%{l_cc}" -Doptimize="%{l_cflags -O}" \
|
||
|
-Dlocincpth="%{l_prefix}/include" \
|
||
|
-Dlibpth="%{l_prefix}/lib /lib /usr/lib /usr/ccs/lib" \
|
||
|
-Uinstallusrbinperl
|
||
|
%{l_make} %{l_mflags -O} -f Makefile
|
||
|
|
||
|
%install
|
||
|
# install in separate directory
|
||
|
rm -rf $RPM_BUILD_ROOT
|
||
|
%{l_make} %{l_mflags} -f Makefile install
|
||
|
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 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.0.tar.gz \
|
||
|
Set-Scalar-1.09.tar.gz \
|
||
|
TimeDate-1.10.tar.gz \
|
||
|
DateManip-5.40.tar.gz \
|
||
|
Config-IniFiles-2.19.tar.gz \
|
||
|
Parse-RecDescent-1.80.tar.gz \
|
||
|
Net-Daemon-0.35.tar.gz \
|
||
|
Net-Server-0.75.tar.gz \
|
||
|
Net-ext-0.932.tar.gz \
|
||
|
libnet-1.0703.tar.gz \
|
||
|
Syslog-0.95.tar.gz \
|
||
|
Time-HiRes-01.20.tar.gz \
|
||
|
Digest-MD5-2.13.tar.gz \
|
||
|
HTML-Parser-3.25.tar.gz \
|
||
|
URI-1.12.tar.gz \
|
||
|
MIME-tools-5.411.tar.gz \
|
||
|
MIME-Base64-2.12.tar.gz \
|
||
|
libwww-perl-5.53.tar.gz \
|
||
|
Image-Info-1.07.tar.gz \
|
||
|
Image-Size-2.93.tar.gz \
|
||
|
Alias-2.32.tar.gz \
|
||
|
Archive-Tar-0.22.tar.gz \
|
||
|
Expect-1.11.tar.gz \
|
||
|
IPC-Shareable-0.60.tar.gz \
|
||
|
Inline-0.42.tar.gz \
|
||
|
Mail-Sendmail-0.78.tar.gz \
|
||
|
MailTools-1.15.tar.gz \
|
||
|
Date-Calc-4.3.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
|
||
|
|