wok-6.x view eaccelerator/receipt @ rev 15588

arj: ugly ack
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Dec 02 16:43:36 2013 +0000 (2013-12-02)
parents 930b3af4af48
children 8fdebdc42cf1
line source
1 # SliTaz package receipt.
3 PACKAGE="eaccelerator"
4 VERSION="0.9.6.1"
5 CATEGORY="system-tools"
6 SHORT_DESC="PHP accelerator, optimizer, and dynamic content cache."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://eaccelerator.net/"
11 WGET_URL="http://bart.eaccelerator.net/source/$VERSION/$TARBALL"
12 TAGS="php"
14 DEPENDS="php m4"
15 BUILD_DEPENDS="php-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 export PHP_PREFIX="/usr"
22 $PHP_PREFIX/bin/phpize
23 ./configure --enable-eaccelerator=shared \
24 --with-php-config=$PHP_PREFIX/bin/php-config \
25 --prefix=/usr --infodir=/usr/share/info \
26 --mandir=/usr/share/man $CONFIGURE_ARGS &&
27 make &&
28 make INSTALL_ROOT=$DESTDIR install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/tmp/eaccelerator $fs/usr/share/php
35 cp $(find $install | grep eaccelerator.so) $fs/usr/share/php/
36 chmod 0777 $fs/tmp/eaccelerator
37 }
39 # Pre and post install commands for Tazpkg.
40 post_install()
41 {
42 grep -q ^extension=msql.so $1/etc/php.ini || \
43 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
45 # Start Web server.
46 while read daemon file; do
47 if [ -f /etc/init.d/$daemon -a ! -f "/var/run/$file" ]; then
48 /etc/init.d/$daemon start
49 fi
50 done <<EOT
51 apache apache/httpd.pid
52 lighttpd lighttpd.pid
53 EOT
54 }
56 # Pre and post remove commands for Tazpkg.
57 pre_remove()
58 {
59 sed -i '/.*eaccelerator.*/d' /etc/php.ini
61 # Start Web server.
62 while read daemon file; do
63 if [ -z "$1" -a -f /etc/init.d/$daemon \
64 -a ! -f "/var/run/$file" ]; then
65 /etc/init.d/$daemon start
66 fi
67 done <<EOT
68 apache apache/httpd.pid
69 lighttpd lighttpd.pid
70 EOT
71 }