wok annotate eaccelerator/receipt @ rev 25464

httpfs2-fuse: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Sep 30 09:07:42 2022 +0000 (2022-09-30)
parents fb22330086d8
children d66160614dc4
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@15588 8 LICENSE="GPL2"
pascal@1746 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@1746 10 WEB_SITE="http://eaccelerator.net/"
pascal@25028 11 WGET_URL="https://github.com/downloads/eaccelerator/eaccelerator/$TARBALL"
pascal@15588 12 TAGS="php"
pascal@15588 13
pascal@1746 14 DEPENDS="php m4"
pascal@15657 15 BUILD_DEPENDS="php-dev sed coreutils-conditions" # gawk re2c
pascal@1746 16
pascal@24384 17 # What is the latest version available today?
pascal@24083 18 current_version()
pascal@24083 19 {
pascal@24384 20 wget -O - https://sourceforge.net/projects/eaccelerator/files/eaccelerator/ 2>/dev/null | \
pascal@24384 21 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24384 22 sed '/scope="row/!d;/tar/!d;/binary/d;s|.*/eAccelerator%20||;s|/.*||;q'
pascal@24083 23 }
pascal@24083 24
pascal@1746 25 # Rules to configure and make the package.
pascal@1746 26 compile_rules()
pascal@1746 27 {
pascal@1746 28 cd $src
pascal@1746 29 export PHP_PREFIX="/usr"
pascal@1746 30 $PHP_PREFIX/bin/phpize
pascal@1746 31 ./configure --enable-eaccelerator=shared \
pascal@1746 32 --with-php-config=$PHP_PREFIX/bin/php-config \
pascal@1746 33 --prefix=/usr --infodir=/usr/share/info \
pascal@1746 34 --mandir=/usr/share/man $CONFIGURE_ARGS &&
pascal@1746 35 make &&
pascal@15588 36 make INSTALL_ROOT=$DESTDIR install
pascal@1746 37 }
pascal@1746 38
pascal@1746 39 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1746 40 genpkg_rules()
pascal@1746 41 {
pascal@1746 42 mkdir -p $fs/tmp/eaccelerator $fs/usr/share/php
pascal@15588 43 cp $(find $install | grep eaccelerator.so) $fs/usr/share/php/
pascal@1746 44 chmod 0777 $fs/tmp/eaccelerator
pascal@1746 45 }
pascal@1746 46
pascal@1746 47 # Pre and post install commands for Tazpkg.
pascal@1746 48 post_install()
pascal@1746 49 {
pascal@18730 50 grep -q ^extension=msql.so "$1/etc/php.ini" || \
pascal@18730 51 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 52
pascal@1749 53 # Start Web server.
pascal@1749 54 while read daemon file; do
pascal@1749 55 if [ -f /etc/init.d/$daemon -a ! -f "/var/run/$file" ]; then
pascal@1749 56 /etc/init.d/$daemon start
pascal@1749 57 fi
pascal@1749 58 done <<EOT
pascal@1749 59 apache apache/httpd.pid
pascal@1749 60 lighttpd lighttpd.pid
pascal@1749 61 EOT
pascal@1749 62 }
pascal@1749 63
pascal@1749 64 # Pre and post remove commands for Tazpkg.
pascal@1749 65 pre_remove()
pascal@1749 66 {
pascal@1749 67 sed -i '/.*eaccelerator.*/d' /etc/php.ini
pascal@1746 68
pascal@1746 69 # Start Web server.
pascal@1746 70 while read daemon file; do
pascal@1746 71 if [ -z "$1" -a -f /etc/init.d/$daemon \
pascal@1746 72 -a ! -f "/var/run/$file" ]; then
pascal@1746 73 /etc/init.d/$daemon start
pascal@1746 74 fi
pascal@1746 75 done <<EOT
pascal@1746 76 apache apache/httpd.pid
pascal@1746 77 lighttpd lighttpd.pid
pascal@1746 78 EOT
pascal@1746 79 }