wok-current view eaccelerator/receipt @ rev 24149
gcc: remove obsolete gawk comment
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Sat Nov 27 15:12:31 2021 -0500 (2021-11-27) |
parents | 9e01bc6321ea |
children | 9bbac86a37f7 |
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 sed coreutils-conditions" # gawk re2c
17 current_version()
18 {
19 wget -O - https://github.com/eaccelerator/eaccelerator/releases 2>/dev/null | \
20 sed '/refs.tags/!d;/-rc/d;/tar.gz/!d;s|.*refs.tags.v*\(.*\).tar.*|\1|;q'
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 cd $src
27 export PHP_PREFIX="/usr"
28 $PHP_PREFIX/bin/phpize
29 ./configure --enable-eaccelerator=shared \
30 --with-php-config=$PHP_PREFIX/bin/php-config \
31 --prefix=/usr --infodir=/usr/share/info \
32 --mandir=/usr/share/man $CONFIGURE_ARGS &&
33 make &&
34 make INSTALL_ROOT=$DESTDIR install
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/tmp/eaccelerator $fs/usr/share/php
41 cp $(find $install | grep eaccelerator.so) $fs/usr/share/php/
42 chmod 0777 $fs/tmp/eaccelerator
43 }
45 # Pre and post install commands for Tazpkg.
46 post_install()
47 {
48 grep -q ^extension=msql.so "$1/etc/php.ini" || \
49 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"
51 # Start Web server.
52 while read daemon file; do
53 if [ -f /etc/init.d/$daemon -a ! -f "/var/run/$file" ]; then
54 /etc/init.d/$daemon start
55 fi
56 done <<EOT
57 apache apache/httpd.pid
58 lighttpd lighttpd.pid
59 EOT
60 }
62 # Pre and post remove commands for Tazpkg.
63 pre_remove()
64 {
65 sed -i '/.*eaccelerator.*/d' /etc/php.ini
67 # Start Web server.
68 while read daemon file; do
69 if [ -z "$1" -a -f /etc/init.d/$daemon \
70 -a ! -f "/var/run/$file" ]; then
71 /etc/init.d/$daemon start
72 fi
73 done <<EOT
74 apache apache/httpd.pid
75 lighttpd lighttpd.pid
76 EOT
77 }