wok-next annotate eaccelerator/receipt @ rev 21135

Up libgcrypt (1.8.4), libpgp-error (1.34), libxml2 (2.9.9), libxslt (1.1.33).
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun Jan 20 16:02:24 2019 +0200 (2019-01-20)
parents d958fec46c9f
children
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"
al@21020 6 SHORT_DESC="PHP accelerator, optimizer, and dynamic content cache"
pascal@1746 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15588 8 LICENSE="GPL2"
al@20882 9 WEB_SITE="http://eaccelerator.net/"
al@20882 10 REPOLOGY="php:eaccelerator"
al@20882 11
pascal@1746 12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@1746 13 WGET_URL="http://bart.eaccelerator.net/source/$VERSION/$TARBALL"
pascal@15588 14
pascal@15657 15 BUILD_DEPENDS="php-dev sed coreutils-conditions" # gawk re2c
pascal@1746 16
al@21020 17 compile_rules() {
pascal@1746 18 export PHP_PREFIX="/usr"
pascal@1746 19 $PHP_PREFIX/bin/phpize
pascal@1746 20 ./configure --enable-eaccelerator=shared \
pascal@1746 21 --with-php-config=$PHP_PREFIX/bin/php-config \
pascal@1746 22 --prefix=/usr --infodir=/usr/share/info \
pascal@1746 23 --mandir=/usr/share/man $CONFIGURE_ARGS &&
pascal@1746 24 make &&
al@21020 25 make INSTALL_ROOT=$install install
pascal@1746 26 }
pascal@1746 27
al@21020 28 genpkg_rules() {
pascal@1746 29 mkdir -p $fs/tmp/eaccelerator $fs/usr/share/php
pascal@15588 30 cp $(find $install | grep eaccelerator.so) $fs/usr/share/php/
pascal@1746 31 chmod 0777 $fs/tmp/eaccelerator
al@21020 32 DEPENDS="php m4"
al@21020 33 TAGS="php"
pascal@1746 34 }
pascal@1746 35
al@21020 36 post_install() {
pascal@18730 37 grep -q ^extension=msql.so "$1/etc/php.ini" || \
pascal@18730 38 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 39
pascal@1749 40 # Start Web server.
pascal@1749 41 while read daemon file; do
pascal@1749 42 if [ -f /etc/init.d/$daemon -a ! -f "/var/run/$file" ]; then
pascal@1749 43 /etc/init.d/$daemon start
pascal@1749 44 fi
pascal@1749 45 done <<EOT
pascal@1749 46 apache apache/httpd.pid
pascal@1749 47 lighttpd lighttpd.pid
pascal@1749 48 EOT
pascal@1749 49 }
pascal@1749 50
al@21020 51 pre_remove() {
pascal@1749 52 sed -i '/.*eaccelerator.*/d' /etc/php.ini
pascal@1746 53
pascal@1746 54 # Start Web server.
pascal@1746 55 while read daemon file; do
pascal@1746 56 if [ -z "$1" -a -f /etc/init.d/$daemon \
pascal@1746 57 -a ! -f "/var/run/$file" ]; then
pascal@1746 58 /etc/init.d/$daemon start
pascal@1746 59 fi
pascal@1746 60 done <<EOT
pascal@1746 61 apache apache/httpd.pid
pascal@1746 62 lighttpd lighttpd.pid
pascal@1746 63 EOT
pascal@1746 64 }