[Lunar-commits] CVS: moonbase/zbeta/php5 BUILD, NONE, 1.1 CONFIGURE, NONE, 1.1 CONFLICTS, NONE, 1.1 DEPENDS, NONE, 1.1 DETAILS, NONE, 1.1 POST_INSTALL, NONE, 1.1 POST_REMOVE, NONE, 1.1

Jon South striker at lunar-linux.org
Sun Sep 19 22:32:46 UTC 2004


Update of /var/cvs/lunar/moonbase/zbeta/php5
In directory espresso.lunar-linux.org:/tmp/cvs-serv32179

Added Files:
	BUILD CONFIGURE CONFLICTS DEPENDS DETAILS POST_INSTALL 
	POST_REMOVE 
Log Message:
Adding PHP5 to moonbase


--- NEW FILE: BUILD ---
(

  if [ -s /etc/httpsd/httpd.conf ] ; then
    cp /etc/httpsd/httpd.conf /etc/httpsd/httpd.conf.`date +%Y%m%d`
  fi

  if [ -s /etc/httpd/httpd.conf ] ; then
    cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.`date +%Y%m%d`
  fi

  if [ "$IMAP" == "y" ]; then
    unpack $SOURCE2
    make -C imap-${IMAP_VERSION} slx SPECIALS="SSLDIR=/etc/ssl SSLINCLUDE=/usr/include SSLLIB=/usr/lib"
    OPTS="$OPTS --with-imap=imap-${IMAP_VERSION}"
  fi
  
  if module_installed apache || module_installed apache-mod_ssl ; then
    OPTS="$OPTS --with-apxs=/usr/sbin/apxs"
  elif module_installed apache2 ; then
    OPTS="$OPTS --with-apxs2=/usr/sbin/apxs"
  fi

#  sedit "s:^:#include <errno.h>\n:" ext/mysql/libmysql/mysys_err.h	&&

  verbose_msg "OPTS=$OPTS" &&
  ./configure  --prefix=/usr                 \
               --sysconfdir=/etc             \
               --with-config-file-path=/etc  \
	       --enable-dbase		     \
	       --enable-dbx		     \
	       --enable-dio		     \
	       --with-readline               \
               --with-zlib=/usr              \
               --with-ncurses                \
               $OPTS                         &&
  default_make

) > $C_FIFO 2>&1

--- NEW FILE: CONFIGURE ---
if  !  grep  -q  CONFIGURED  $MODULE_CONFIG;  then

  if  query  "Install ftp support?" y;  then
    OPTS="$OPTS --enable-ftp"
  fi

  if  query   "Install imap support?" y; then
    echo 'IMAP="y"' >> $MODULE_CONFIG
  fi

  if  query  "Enable transparent session id?" y;  then
    OPTS="$OPTS --enable-trans-sid"
  fi
  
  if  query  "Enable sockets support (experimental)?" y;  then
    OPTS="$OPTS --enable-sockets"
  fi

  if  query  "Enable ncurses support (experimental)?" y;  then
    OPTS="$OPTS --with-ncurses"
  fi

  if  query  "Enable global variable support (potential security risk)?" n; then
    echo  'REGGLOBALS="y"'  >>  $MODULE_CONFIG
  fi

  echo  'CONFIGURED="y"'  >>  $MODULE_CONFIG
  echo  'OPTS='\"$OPTS\"    >>  $MODULE_CONFIG

fi

--- NEW FILE: CONFLICTS ---
conflicts php

--- NEW FILE: DEPENDS ---
depends  readline  &&
optional_depends  "aspell"                      \
                  "--with-pspell"               \
                  ""                            \
                  "for spelling functions"      &&

optional_depends  "mhash"                       \
                  "--with-mhash"                \
                  ""                            \
                  "for hash functions support"  &&

optional_depends  "mcrypt"                      \
                  "--with-mcrypt"               \
                  ""                            \
                  "for crypto library"          &&

optional_depends  "gmp"                         \
                  "--with-gmp"                  \
                  ""                            \
                  "GNU math lib support"        &&

optional_depends  "openssl"                     \
                  "--with-openssl"              \
                  ""                            \
                  "for OpenSSL support"         &&

optional_depends  "gettext"                     \
                  "--with-gettext"              \
                  ""                            \
                  "for GNU gettext support"     &&
    
optional_depends  "db"                          \
                  "--with-db3"                  \
                  ""                            \
                  "for Berkeley DB3 support"    &&

optional_depends  "gdbm"                        \
                  "--with-gdbm"                 \
		  ""                            \
		  "for GNU dbm support"         &&

optional_depends  "postgresql"                  \
                  "--with-pgsql=/usr"           \
                  ""                            \
                  "for Postgresql support"      &&
    
optional_depends  "mysql"                       \
                  "--with-mysql=/usr"           \
                  ""                            \
                  "for native MySQL support"    &&

optional_depends "freetds"                      \
                 "--with-sybase=/usr"           \
                 ""                             \
                 "for SyBase support"           &&

optional_depends "freetype2"                    \
                 "--with-freetype-dir=/usr"     \
                 ""                             \
                 "for freetype2 support"        &&

optional_depends "pdflib"                       \
                 "--with-pdflib"                \
                 ""                             \
                 "for pdflib support"           &&

optional_depends "gd"                           \
                 "--with-gd                     \
                  --enable-gd-native-ttf        \
                  --with-jpeg-dir=/usr          \
                  --with-png-dir=/usr"                  \
                 ""                             \
                  "for on the fly graphics"     &&

optional_depends "curl"                         \
                 "--with-curl"                  \
		 ""                             \
		 "for curl support"             &&

optional_depends "ming"                         \
                 "--with-ming"                  \
		 "--without-ming"               \
		 "for dynamic FLASH generation" &&

optional_depends "expat"                        \
                 "--with-expat-dir=/usr"        \
                 ""                             \
                 "for expat xml support"        &&

optional_depends "libxml2"				\
		"--with-libxml-dir=/usr" \
		"--disable-libxml"	\
		"for DOMXML support"			&&

optional_depends "libxslt"			\
		"--with-xsl=/usr" \
		""				\
		"for DOM Xslt support"		&&

optional_depends "openldap"                     \
                 "--with-ldap"                  \
		 ""                             \
		 "For ldap support"

--- NEW FILE: DETAILS ---
          MODULE=php5
         VERSION=5.0.1
    #IMAP_VERSION=2004
    IMAP_VERSION=2004a
SOURCE_DIRECTORY=$BUILD_DIRECTORY/php-$VERSION
          SOURCE=php-$VERSION.tar.bz2
      #SOURCE_VFY=md5:562b7ad1e903248bbe77884cb904b8b7
   SOURCE_URL[0]=http://www.php.net/distributions/$SOURCE
   SOURCE_URL[1]=http://uk2.php.net/distributions/$SOURCE
   SOURCE_URL[2]=http://us2.php.net/distributions/$SOURCE
   SOURCE_URL[3]=http://uk.php.net/distributions/$SOURCE
   SOURCE_URL[4]=http://nl.php.net/distributions/$SOURCE
   SOURCE_URL[5]=http://de.php.net/distributions/$SOURCE
   SOURCE_URL[6]=http://fr.php.net/distributions/$SOURCE
         SOURCE2=imap-$IMAP_VERSION.tar.Z
     SOURCE2_VFY=md5:34d2c66271302cd2f926094fb5e8705d
     SOURCE2_URL=ftp://ftp.cac.washington.edu/imap/$SOURCE2
        WEB_SITE=http://www.php.net
         ENTERED=20011024
         UPDATED=20040714
           SHORT="php is the personal home page scripting language."

cat << EOF
PHP is a widely-used Open Source general-purpose scripting language
that is especially suited for Web development and can be embedded
into HTML. Its syntax draws upon C, Java, and Perl, and is easy to
learn. PHP runs on many different platforms and can be used as a
standalone executable or as a module under a variety of Web servers.
It has excellent support for databases, XML, LDAP, IMAP, Java,
various Internet protocols, and general data manipulation, and is
extensible via its powerful API. It is actively developed and
supported by a talented and energetic international team. Numerous
Open Source and commercial PHP-based application packages are
available.
EOF

--- NEW FILE: POST_INSTALL ---

# prototype AddType definition for apache2
if [ -f /etc/httpd/conf/httpd.conf ] ; then
  if ! grep -q "x-httpd-php" /etc/httpd/conf/httpd.conf ; then
    cat >> /etc/httpd/conf/httpd.conf << EOF

# AddType required for php to work:
AddType  application/x-httpd-php         .php .php5 .php4 .php3 .phtml
AddType  application/x-httpd-php-source  .phps

EOF
  fi
fi

if [ ! -e /etc/php.ini ] ; then
  cp $SOURCE_DIRECTORY/php.ini-dist /etc/php.ini
fi

case  $REGGLOBALS  in
  y|Y)
    sedit "s/register_globals = Off/register_globals = On/" /etc/php.ini
    ;;
    *) true
    ;;
esac


--- NEW FILE: POST_REMOVE ---
if    module_installed  apache;  then

  cp        /etc/httpd/httpd.conf       /tmp/httpd.conf
  grep  -v  "LoadModule php5_module"    /tmp/httpd.conf  |
  grep  -v  "AddModule mod_php5.c"   >  /etc/httpd/httpd.conf
  rm    -f  /tmp/httpd.conf
  /usr/sbin/apachectl  graceful

elif  module_installed  apache_mod_ssl;  then

  cp        /etc/httpsd/httpd.conf      /tmp/httpd.conf
  grep  -v  "LoadModule php5_module"    /tmp/httpd.conf  |
  grep  -v  "AddModule mod_php5.c"   >  /etc/httpsd/httpd.conf
  rm    -f  /tmp/httpd.conf
  /etc/init.d/apache_modssl.sh  restart

fi



More information about the Lunar-commits mailing list