lfs-buildscripts/chrootscripts/CH07.05-perl.sh

39 lines
715 B
Bash
Raw Normal View History

2024-10-04 03:17:25 +08:00
#!/bin/bash
source versions.sh
GLSOURCES="/sources"
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
[ -d perl-${perl_version} ] && rm -rf perl-${perl_version}
tar -Jxf ${perl_tarball}
cd perl-${perl_version}
vlib="/usr/lib/perl5/${perl_major_version}"
sh Configure -des \
-D prefix=/usr \
-D vendorprefix=/usr \
-D useshrplib \
-D privlib=${vlib}/core_perl \
-D archlib=${vlib}/core_perl \
-D sitelib=${vlib}/site_perl \
-D sitearch=${vlib}/site_perl \
-D vendorlib=${vlib}/vendor_perl \
-D vendorarch=${vlib}/vendor_perl
make
if [ $? -ne 0 ]; then
myfail "Failed building perl"
fi
make install
if [ $? -ne 0 ]; then
myfail "Failed installing perl"
fi