wok annotate eaccelerator/receipt @ rev 13429

partclone: add btrfs & hfsplus support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 04 11:53:21 2012 +0200 (2012-10-04)
parents 31c985a0bd3d
children fcdd50638150
rev   line source
pascal@1746 1 # SliTaz package receipt.
pascal@1746 2
pascal@1746 3 PACKAGE="eaccelerator"
slaxemulator@7948 4 VERSION="0.9.6.1"
pascal@1746 5 CATEGORY="system-tools"
pascal@1746 6 SHORT_DESC="PHP accelerator, optimizer, and dynamic content cache."
pascal@1746 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@1746 8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@1746 9 WEB_SITE="http://eaccelerator.net/"
pascal@1746 10 WGET_URL="http://bart.eaccelerator.net/source/$VERSION/$TARBALL"
pascal@1746 11 DEPENDS="php m4"
pascal@1746 12 BUILD_DEPENDS="php-dev"
jozee@4935 13 TAGS="php"
pascal@1746 14
pascal@1746 15 # Rules to configure and make the package.
pascal@1746 16 compile_rules()
pascal@1746 17 {
pascal@1746 18 cd $src
pascal@1746 19 export PHP_PREFIX="/usr"
pascal@1746 20 $PHP_PREFIX/bin/phpize
pascal@1746 21 ./configure --enable-eaccelerator=shared \
pascal@1746 22 --with-php-config=$PHP_PREFIX/bin/php-config \
pascal@1746 23 --prefix=/usr --infodir=/usr/share/info \
pascal@1746 24 --mandir=/usr/share/man $CONFIGURE_ARGS &&
pascal@1746 25 make &&
pascal@1746 26 make INSTALL_ROOT=$PWD/_pkg install
pascal@1746 27 }
pascal@1746 28
pascal@1746 29 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1746 30 genpkg_rules()
pascal@1746 31 {
pascal@1746 32 mkdir -p $fs/tmp/eaccelerator $fs/usr/share/php
pascal@1746 33 cp $(find $_pkg | grep eaccelerator.so) $fs/usr/share/php/
pascal@1746 34 chmod 0777 $fs/tmp/eaccelerator
pascal@1746 35 }
pascal@1746 36
pascal@1746 37 # Pre and post install commands for Tazpkg.
pascal@1746 38 post_install()
pascal@1746 39 {
pascal@1746 40 grep -q ^extension=msql.so $1/etc/php.ini || \
pascal@1749 41 sed -e 's|;.*extension=msql.so|; extension=msql.so\nextension=eaccelerator.so\neaccelerator.shm_size="48"\neaccelerator.cache_dir="/tmp/eaccelerator"\neaccelerator.enable="1"\neaccelerator.optimizer="1"\neaccelerator.check_mtime="1"\neaccelerator.debug="0"\neaccelerator.filter=""\neaccelerator.shm_max="0"\neaccelerator.shm_ttl="0"\neaccelerator.shm_prune_period="0"\neaccelerator.shm_only="0"\neaccelerator.compress="1"\neaccelerator.compress_level="9"|' -i $1/etc/php.ini
pascal@1749 42
pascal@1749 43 # Start Web server.
pascal@1749 44 while read daemon file; do
pascal@1749 45 if [ -f /etc/init.d/$daemon -a ! -f "/var/run/$file" ]; then
pascal@1749 46 /etc/init.d/$daemon start
pascal@1749 47 fi
pascal@1749 48 done <<EOT
pascal@1749 49 apache apache/httpd.pid
pascal@1749 50 lighttpd lighttpd.pid
pascal@1749 51 EOT
pascal@1749 52 }
pascal@1749 53
pascal@1749 54 # Pre and post remove commands for Tazpkg.
pascal@1749 55 pre_remove()
pascal@1749 56 {
pascal@1749 57 sed -i '/.*eaccelerator.*/d' /etc/php.ini
pascal@1746 58
pascal@1746 59 # Start Web server.
pascal@1746 60 while read daemon file; do
pascal@1746 61 if [ -z "$1" -a -f /etc/init.d/$daemon \
pascal@1746 62 -a ! -f "/var/run/$file" ]; then
pascal@1746 63 /etc/init.d/$daemon start
pascal@1746 64 fi
pascal@1746 65 done <<EOT
pascal@1746 66 apache apache/httpd.pid
pascal@1746 67 lighttpd lighttpd.pid
pascal@1746 68 EOT
pascal@1746 69 }