# Description file for tinycore extension ($ tcbuild sample.desc) # Source STYPE="http" MIRROR="de.php.net/distributions" PACKAGE="php" SEP="-" VERSION="5.4.3" PKG_EXT=".tar.bz2" RENAME_TO="apache2-mod-php5" BUILD_DEPS="perl5 attr acl libcap net-snmp recode unixODBC icu libxslt bsddb autoconf automake libtool enchant apr-util apr apache2 gnutls cyrus-sasl Xorg-7.6-dev expat2 libxml2 libiconv gmp gettext readline mysql libmhash libgdbm bash openssl-1.0.0 pcre coreutils sqlite3 bzip2 bzip2-lib curl libmcrypt openldap postgresql krb5" RUN_DEPS="apache2 expat2 pcre libxml2 ncurses openssl-1.0.0" FLAGS=" --enable-shared \ --enable-static \ --enable-libgcc \ --enable-bcmath=shared \ --enable-soap=shared \ --enable-dmalloc=shared \ --with-apxs2=/usr/local/bin/apxs2 \ --with-recode=shared,/usr/local \ --with-snmp=shared,/usr/local \ --enable-sockets=shared \ --enable-dba=shared \ --enable-zip=shared \ --with-xsl=shared,/usr/local \ --with-config-file-path=/usr/local/apache2/conf/php5/ \ --with-config-file-scan-dir=/usr/local/apache2/conf/php5/extensions/ \ --with-freetype-dir=/usr \ --with-png-dir=/usr \ --with-jpeg-dir=/usr \ --with-xpm-dir=/usr \ --with-libexpat-dir=shared,/usr/local \ --with-gmp=shared,/usr/local \ --with-gettext=shared,/usr/local \ --with-iconv=shared,/usr/local \ --with-pgsql=shared,/usr/local \ --with-pdo-pgsql=shared,/usr/local \ --enable-gd-native-ttf \ --enable-exif=shared \ --enable-ftp=shared \ --enable-sysvsem=shared \ --enable-sysvshm=shared \ --enable-sysvmsg=shared \ --enable-wddx=shared \ --enable-shmop=shared \ --with-readline=shared,/usr/local \ --with-sqlite3=shared,/usr/local \ --with-pdo-sqlite=shared,/usr/local \ --with-mhash=shared,/usr/local \ --with-gd=shared \ --with-gdbm=shared,/usr/local \ --enable-calendar=shared \ --with-libxml-dir=shared,/usr/local \ --with-openssl=shared,/usr/local \ --with-pcre-regex=/usr/local \ --with-zlib=shared,/usr \ --with-zlib-dir=/usr \ --with-bz2=shared,/usr/local \ --with-curl=shared,/usr/local \ --with-mcrypt=shared,/usr/local \ --with-ldap=shared,/usr/local \ --with-mysql=shared,mysqlnd \ --with-mysqli=shared,mysqlnd \ --with-pdo-mysql=shared,mysqlnd \ --enable-intl=shared \ --disable-phar \ --disable-cli \ --without-pear \ --with-enchant=shared,/usr/local \ --disable-cgi \ --with-unixODBC=shared,/usr/local \ --with-pdo-odbc=shared,unixODBC \ --with-db4=shared,/usr/local \ --enable-mbstring=shared" # --with-mysql=shared,/usr/local # --with-mysqli=shared,/usr/local/bin/mysql_config # --with-pdo-mysql=shared,/usr/local # Packaging, splitting DEV_MASK="-name phpize -o -wholename *test/* -o -wholename *build/* -o -name php-config -o -name *.h -o -name *.c -o -name *.la -o -name *.a -o -name *.m4 -o -name *.pc -o -name *.rh" CONF_MASK="" CONF_MAND_MASK="" LOCALE_MASK="" DOC_MASK="remove" # Package description DESCRIPTION="php5 - Apache 2 module and extensions" AUTHORS="Various" MAINTAINER="gutmensch" HOMEPAGE="http://www.php.net" LICENSE="GPL" TAGS="apache php module version 5" COMMENTS="For use with apache2.tcz extension. This extension does not depend on php5.tcz, nor are they related. Usage: Install and restart your Apache Web Server. If your httpd.conf is not in the default location, you have to add \"Include conf/php5/mod_php5.conf\" manually to your conf. Suhosin extension by Stefan Esser is included. Edit /usr/local/apache2/conf/php5/php.ini to your needs and add to backup. Do the same with the extension configuration files in /usr/local/apache2/conf/php5/extensions/. IMPORTANT: For some of the included extensions you need special additional libraries, please take a look into dist.ini." CHANGE="__TODAY__ " ##### changelog, dont modify! is done by script! ##### #CHANGELOG[9]="2012/05/07 Updated to PHP 5.4.3" #CHANGELOG[8]="2010/11/02 Added mbstring" #CHANGELOG[7]="2010/10/16 Added bsddb and iodbc support, moved extensions to dist.ini, extracted more extensions" #CHANGELOG[6]="2010/09/14-1 Added xsl extension" #CHANGELOG[5]="2010/09/14 PHP module is automatically added to Apache by mod_php5.conf file." #CHANGELOG[4]="2010/08/20 Bump to 5.3.3" #CHANGELOG[3]="2010/07/02-2 Added enchant support" #CHANGELOG[2]="2010/07/02-1 Added postgresql support" #CHANGELOG[1]="2010/07/02 Corrected mysql flags to use mysqlnd, removed kerberos flag because it is only for imap" #CHANGELOG[0]="2010/05/30 Initial version 5.3.2" ############### end of changelog ##################### configure_special_source () { mkdir -p "${TCB_BLDDIR}/${PACKAGE}/usr/local/apache2/conf" cp /usr/local/apache2/conf/httpd.conf ${TCB_BLDDIR}/${PACKAGE}/usr/local/apache2/conf/ # apxs fix if [ ! -e /usr/local/bin/apxs2 ];then cp -p /usr/local/bin/apxs /usr/local/bin/apxs2 sed -i -e '1s"#!.\+"#!/usr/local/bin/perl"' /usr/local/bin/apxs2 fi [ $? -eq 0 ] && success || fail } work_special_build () { cp ${TCB_BLDDIR}/../extensions/*.so ${TCB_BLDDIR}/apache2-mod-php5/usr/local/lib/php/extensions/no-debug-zts-20100525/ # erase empty windows files find ${TCB_BLDDIR}/${PACKAGE} -name ".*" | xargs rm -rf rm -rf ${TCB_BLDDIR}/${PACKAGE}/usr/local/apache2/conf mkdir -p ${TCB_BLDDIR}/${PACKAGE}/usr/local/apache2/conf/php5/extensions/ cp ${TCB_SOURCE}/php.ini-production ${TCB_BLDDIR}/${PACKAGE}/usr/local/apache2/conf/php5/php.ini.sample sed -i -e 's%;date\.timezone =%date\.timezone = UTC%' ${TCB_BLDDIR}/${PACKAGE}/usr/local/apache2/conf/php5/php.ini.sample cp ${TCB_BLDDIR}/../dist.ini ${TCB_BLDDIR}/${PACKAGE}/usr/local/apache2/conf/php5/extensions/dist.ini.sample mv ${TCB_BLDDIR}/apache2-mod-php5/usr/local/apache2/modules/libphp5.so ${TCB_BLDDIR}/apache2-mod-php5/usr/local/apache2/modules/mod_php5.so mkdir -p ${TCB_BLDDIR}/${PACKAGE}/usr/local/tce.installed cat < ${TCB_BLDDIR}/${PACKAGE}/usr/local/tce.installed/apache2-mod-php5 #!/bin/sh HTTPDCONF=/usr/local/apache2/conf/httpd.conf # Creating standard files and extensions [ ! -e /usr/local/apache2/conf/php5/php.ini ] && busybox cp /usr/local/apache2/conf/php5/php.ini.sample /usr/local/apache2/conf/php5/php.ini [ ! -e /usr/local/apache2/conf/php5/extensions/dist.ini ] && busybox cp /usr/local/apache2/conf/php5/extensions/dist.ini.sample /usr/local/apache2/conf/php5/extensions/dist.ini if [ -e "\$HTTPDCONF" ];then if [ -z "\$(grep mod_php5 \$HTTPDCONF)" ];then echo "Include conf/php5/mod_php5.conf" >> \$HTTPDCONF fi fi EOF chmod 775 ${TCB_BLDDIR}/${PACKAGE}/usr/local/tce.installed/apache2-mod-php5 chown -R root:staff ${TCB_BLDDIR}/${PACKAGE}/usr/local/tce.installed cat < ${TCB_BLDDIR}/${PACKAGE}/usr/local/apache2/conf/php5/mod_php5.conf LoadModule php5_module modules/mod_php5.so AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps EOF1 [ $? -eq 0 ] && success || fail }