wok view eaccelerator/receipt @ rev 3290

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