wok-current view eaccelerator/receipt @ rev 24992

Up sip (4.19.25)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 14 18:19:29 2022 +0000 (2022-05-14)
parents 9bbac86a37f7
children 22471cbea549
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 # What is the latest version available today?
18 current_version()
19 {
20 wget -O - https://sourceforge.net/projects/eaccelerator/files/eaccelerator/ 2>/dev/null | \
21 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
22 sed '/scope="row/!d;/tar/!d;/binary/d;s|.*/eAccelerator%20||;s|/.*||;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 cd $src
29 export PHP_PREFIX="/usr"
30 $PHP_PREFIX/bin/phpize
31 ./configure --enable-eaccelerator=shared \
32 --with-php-config=$PHP_PREFIX/bin/php-config \
33 --prefix=/usr --infodir=/usr/share/info \
34 --mandir=/usr/share/man $CONFIGURE_ARGS &&
35 make &&
36 make INSTALL_ROOT=$DESTDIR install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/tmp/eaccelerator $fs/usr/share/php
43 cp $(find $install | grep eaccelerator.so) $fs/usr/share/php/
44 chmod 0777 $fs/tmp/eaccelerator
45 }
47 # Pre and post install commands for Tazpkg.
48 post_install()
49 {
50 grep -q ^extension=msql.so "$1/etc/php.ini" || \
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"
53 # Start Web server.
54 while read daemon file; do
55 if [ -f /etc/init.d/$daemon -a ! -f "/var/run/$file" ]; then
56 /etc/init.d/$daemon start
57 fi
58 done <<EOT
59 apache apache/httpd.pid
60 lighttpd lighttpd.pid
61 EOT
62 }
64 # Pre and post remove commands for Tazpkg.
65 pre_remove()
66 {
67 sed -i '/.*eaccelerator.*/d' /etc/php.ini
69 # Start Web server.
70 while read daemon file; do
71 if [ -z "$1" -a -f /etc/init.d/$daemon \
72 -a ! -f "/var/run/$file" ]; then
73 /etc/init.d/$daemon start
74 fi
75 done <<EOT
76 apache apache/httpd.pid
77 lighttpd lighttpd.pid
78 EOT
79 }