Revision: 14235 http://gar.svn.sourceforge.net/gar/?rev=14235&view=rev Author: bdwalton Date: 2011-04-16 23:48:25 +0000 (Sat, 16 Apr 2011)
Log Message: ----------- gar/v2: add a script that builds php5 extension scripts for use by the build cas Added Paths: ----------- csw/mgar/gar/v2/bin/php5ext_build_scripts Added: csw/mgar/gar/v2/bin/php5ext_build_scripts =================================================================== --- csw/mgar/gar/v2/bin/php5ext_build_scripts (rev 0) +++ csw/mgar/gar/v2/bin/php5ext_build_scripts 2011-04-16 23:48:25 UTC (rev 14235) @@ -0,0 +1,70 @@ +#!/bin/bash + +set -x + +MERGEDIR=$1; shift +PHP5MODS=opt/csw/php5/extensions +PHP5EXTDIR=opt/csw/php5/lib/php/extensions/no-debug-non-zts-20090626 + +cd $MERGEDIR/ + +[ -d $PHP5MODS ] || mkdir -p $PHP5MODS + +for a in $*; do + for f in $(find $PHP5EXTDIR -name "*$a*"); do + modfile=$(basename $f) + modname=$(echo $modfile | sed 's/\.so$//') + php5modfile=$PHP5MODS/$modname + cat <<EOF > $php5modfile + +PIR=\${PKG_INSTALL_ROOT:-'/'} +PHP5_PREFIX=/opt/csw/php5 +PHP5_BINDIR=\$PHP5_PREFIX/bin +PHPEXT=\$PHP5_BINDIR/phpext + +if [ "\$1" = install ]; then + +echo "File created by \$PKGINST during install. Please do not remove." > \$PIR/$php5modfile + +# Source csw.conf, if it exists +if [ -f \$PIR/opt/csw/etc/csw.conf ] ; then + . \$PIR/opt/csw/etc/csw.conf +fi +if [ -f \$PIR/etc/opt/csw/csw.conf ] ; then + . \$PIR/etc/opt/csw/csw.conf +fi + +# Modules will be enabled by default, but a global kill switch +# is checked, followed by a module specific value. Thus, +# either php5_enable_modules or php5_enable_mysql (for example) +# could disable activation of the suexec module. The +# +# This value is passed to phpext (-e: enable; -d: disable) +enmod=-e + +if [ "\$php5_enable_modules" = "no" ]; then + enmod=-d +fi + +if [ "\$php5_enable_$modname" = "no" ]; then + enmod=-d +elif [ "\$php5_enable_$modname" = "yes" ]; then + enmod=-e +fi + +if [ -f "\$PIR/\$PHP5_CONFIG" -a -x "\$PIR/\$PHPEXT" ]; then + # Add the module module, optionally enabling it by default + chroot \$PIR \$PHPEXT \$enmod $modname +fi + +else + +rm \$PIR/$php5modfile + +if [ -f "\$PIR/\$PHP5_CONFIG" -a -x "\$PIR/\$PHPEXT" ]; then + chroot \$PIR \$PHPEXT -d $modname +fi +fi +EOF + done +done Property changes on: csw/mgar/gar/v2/bin/php5ext_build_scripts ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ devel mailing list devel@lists.opencsw.org https://lists.opencsw.org/mailman/listinfo/devel