Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
pkg-scripts/system/perl-5.30.0-0.build.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
161 lines (131 sloc)
4.53 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
set -xe | |
# to build system perl: | |
# umask 022 | |
# sudo mkdir -p /usr/local/system/perl-VERSION-BUILD | |
# sudo chown build:build /usr/local/system/perl-VERSION-BUILD | |
# sudo -u build ./perl-VERSION-BUILD.build.sh | |
# sudo chown -R bin:bin /usr/local/system/perl-VERSION-BUILD | |
PKG=perl | |
VERSION=5.30.0 | |
BUILD=0 | |
PREFIX=/usr/local/system/$PKG-$VERSION-$BUILD | |
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi | |
mkdir -p $PREFIX | |
cat >$PREFIX/profile <<-EOF | |
PATH=$PREFIX/bin:\$PATH | |
EOF | |
. $PREFIX/profile | |
# Some cpan mopdule tests fail when build directory is on | |
# nfs, because they try to remove directories with unlinked | |
# but opened files in it. | |
# Additionally we want a clean envirnoment and a local cpan scratch | |
# | |
HOME=/dev/shm/$PKG-$VERSION-$BUILD.build.home.tmp | |
mkdir -p $HOME | |
exec </dev/null # to many cpan modules might ask something | |
export MAKEFLAGS="-j $(nproc)" | |
mkdir -p $HOME/build | |
cd $HOME/build | |
# The problem with a git checkout is, that the perl build system does many things | |
# differentily when is sees .git - e.g. run additional developer checks. | |
#test -d perl || git clone https://perl5.git.perl.org/perl.git | |
#cd perl | |
#git checkout "v$VERSION" ; git reset --hard | |
test -e perl-$VERSION.tar.gz || wget http://www.cpan.org/src/5.0/perl-$VERSION.tar.gz | |
test -d perl-$VERSION || tar xf perl-$VERSION.tar.gz | |
cd perl-$VERSION | |
# -d : use defaults for all answers. | |
# -e : go on without questioning past the production of config.sh. | |
# -s : silent mode, only echoes questions and essential information. | |
# -Dusedevel : allow devel (uneven minor) versions. Prevents bin/perl->bin/perlVERSION symlink | |
# -Duseshrplib : build shared perl library (required when perl is to be included in a shared library) | |
# -DEBUGGING : add debugging code (perl -D) | |
# | |
./Configure -des -Duseshrplib -Dprefix=$PREFIX | |
make -j$(nproc) | |
# Note: If you get a failure in porting/utils test here, it might be, that we are | |
# running cpan somewhere else which leads to an extra and unexpected "\n" being | |
# emitted by CPAN.pm BEGIN and a failure of the test (which does "perl -c CPAN.pm") | |
# | |
make test | |
make install | |
cd $PREFIX; | |
test -e $HOME/.cpan/CPAN/MyConfig.pm && rm $HOME/.cpan/CPAN/MyConfig.pm | |
cpan</dev/null | |
# Too many modules "recommend" stupid things like mod_perl | |
# do not auto install recommended modules | |
perl -MCPAN <<'_EOF_' | |
CPAN::HandleConfig->load(); | |
CPAN::Shell->o('conf','recommends_policy',0); | |
CPAN::Shell->o('conf','commit'); | |
_EOF_ | |
cpan -u # update everything we already have | |
# These two with -T (without test), because the tests are interactive and access /dev/tty | |
# Do these first, because they are required by Bundle::CPAN | |
# | |
cpan -T Term::ReadLine::Perl | |
cpan -T Term::ReadLine::Gnu | |
# Now the rest of Bundle::CPAN first, so that we use latest code for the following | |
# installations | |
# | |
cpan Bundle::CPAN | |
# clusterd... | |
( | |
cd $HOME/build | |
test -e Donald-1.04.tar.gz || wget https://github.molgen.mpg.de/donald/Donald/archive/1.05.tar.gz -O Donald-1.05.tar.gz | |
test -d Donald-1.05 || tar xf Donald-1.05.tar.gz | |
cd Donald-1.05 | |
cpan . | |
) | |
# arplisten... | |
( | |
cd $HOME/build | |
test -e Pcap-0.02.tar.gz || cp /home/buczek/build/Pcap/Pcap-0.02.tar.gz . | |
test -d Pcap-0.02 || tar xf Pcap-0.02.tar.gz | |
cd Pcap-0.02 | |
cpan . | |
) | |
# pmirror | |
cpan File::FnMatch | |
# nachtwaechter , ... | |
cpan DBI | |
cpan DBD::SQLite | |
cpan Mail::Internet | |
cpan LWP | |
# Net::SSLeay require by LWP::Protocol:https | |
# one tests hangs forever with openssl 1.1.1a | |
# | |
cpan -T Net::SSLeay | |
cpan LWP::Protocol::https | |
# http://net-snmp.sourceforge.net/ (Net-SNMP : SNMP.pm, NetSNMP::*) | |
# should match exact version of net-snmp packages | |
# install everything here to avoid dependency. | |
# | |
# cpan has 5.0404 of Net-SNMP so use latest version from its home. | |
# | |
# If you get errors | |
# "panic: attempt to copy freed scalar" | |
# "Bizarre copy of HASH in list assignment# | |
# this is from perl bug: | |
# https://rt.perl.org/Public/Bug/Display.html?id=77706 | |
# triggered by ExtUtils::MakeMaker. The patch | |
# /src/mariux/patches/0001-Carp.pm-continue-with-screwed-up-perl-stack.patch | |
# at the top of this file is there to prevent this. | |
# | |
( | |
cd $HOME/build | |
test -e net-snmp-5.8.tar.gz || wget https://downloads.sourceforge.net/project/net-snmp/net-snmp/5.8/net-snmp-5.8.tar.gz | |
test -d net-snmp-5.8 || tar xvf net-snmp-5.8.tar.gz | |
cd net-snmp-5.8 | |
patch -N -p1 < /src/mariux/patches/net-snmp-0001-Fix-incompatible-definitions-of-U64-type.patch || true | |
./configure --prefix $PREFIX --with-rpm=no | |
make -j 1 | |
make install | |
) | |
# nachtwaechter/mxq cgi (todo: should not be root) | |
cpan CGI | |
cpan DBD::mysql | |
# password tools md4 for NTLM hash# | |
cpan Digest::MD4 | |
exit |