#!/bin/bash ## src2pkg script for: perl ## src2pkg Copyright 2005-2010 Gilbert Ashley # SOURCE_NAME='perl-5.10.0.tar.bz2' NAME='perl' VERSION='5.10.0' # ARCH='${ARCH}' # BUILD='1' # PRE_FIX='usr' # Any extra options go here DOCLIST='AUTHORS README Copying' ALLOW_EMPTY_FILES="YES" AUTO_PATCH=NO # PATCHLIST='' # STD_FLAGS='' # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # do_all_processes can substitute these 16 steps: pre_process find_source make_dirs unpack_source fix_source_perms # configure_source EXTRA_FLAGS='' STD_FLAGS="$(echo $OPTIM_FLAGS $MACHINE $TUNE_FLAGS |white_out)" LIB_PATH="/usr/local/lib${LIBDIRSUFFIX} /usr/lib${LIBDIRSUFFIX} /lib${LIBDIRSUFFIX}" cd $SRC_DIR; if [[ "$ARCH" = "x86_64" ]] ; then # adapted from "Cross Linux From Scratch" # Configure must be told to also use lib64: patch -p1 < $CWD/perl.configure.multilib.patch # "perl -V" should report that libc is in /lib64 sed -i -e '/libc/s#/lib/#/lib64/#' hints/linux.sh # make perl use lib64: echo 'installstyle="lib64/perl5"' >>hints/linux.sh fi if [[ "$QUIET" = "YES" ]] ; then echo -n $BLUE"Running Configure script - "$NORMAL #./Configure $CONFIG_OPTIONS &> /dev/null ./Configure -de \ -Dprefix=/usr \ -Dcccdlflags='-fPIC' \ -Dinstallprefix=/usr \ -Dlibpth="${LIB_PATH}" \ -Doptimize="${STD_FLAGS}" \ -Dusethreads -Duseithreads \ -Dpager='/usr/bin/less -isr' \ -Dinc_version_list='5.8.8 5.8.7 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0' \ -Darchname=${ARCH}-linux &> /dev/null else echo $BLUE"Running Configure script - "$NORMAL #./Configure $CONFIG_OPTIONS ./Configure -de \ -Dprefix=/usr \ -Dcccdlflags='-fPIC' \ -Dinstallprefix=/usr \ -Dlibpth="${LIB_PATH}" \ -Doptimize="${STD_FLAGS}" \ -Dusethreads -Duseithreads \ -Dpager='/usr/bin/less -isr' \ -Dinc_version_list='5.8.8 5.8.7 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0' \ -Darchname=${ARCH}-linux fi if [[ $? -eq 0 ]] ; then echo $GREEN"Done"$NORMAL else echo $RED"FAILED configuration!"$NORMAL exit fi # Kludge for gcc-4.2.4's needlessly changed output: cat makefile | grep -v '\' > makefile.tmp mv makefile.tmp makefile cat x2p/makefile | grep -v '\' > makefile.tmp mv makefile.tmp x2p/makefile compile_source fake_install ( cd $PKG_DIR/usr/bin ; ln -sf perl${VERSION} perl ) fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst make_package post_process # src2pkg - Copyright 2005-2007 Gilbert Ashley ## See the documentation for more help and examples. Below are some of # the most common Extras and Options for easy cut-and-paste use. # EXTRA_CONFIGS='' PRE_FIX='' DOCLIST='' # MAKE_COMMAND='' INSTALL_LINE='' # SHELL_INSTALL='YES' CORRECT_PERMS='NO'