wok view phproxy/receipt @ rev 14128

comical, cpu-g: move from undigest wok
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Feb 28 09:47:02 2013 +0000 (2013-02-28)
parents
children 78cb1e930abd
line source
1 # SliTaz package receipt.
3 PACKAGE="phproxy"
4 SOURCE="PHProxy"
5 VERSION="0.5b2"
6 CATEGORY="network"
7 SHORT_DESC="A proxy HTTP."
8 MAINTAINER="pascal.bellard@slitaz.org"
9 WEB_SITE="http://sebsauvage.net/wiki/doku.php?id=phproxy"
10 TARBALL="$SOURCE%20$VERSION%20mod%20SSE+ARKA%2020100825.7z"
11 WGET_URL="http://sebsauvage.net/temp/$TARBALL"
13 DEPENDS="php"
14 BUILD_DEPENDS="p7zip"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 7zr x $TARBALL
21 cd $SOURCE\ *
22 dos2unix *
23 mkdir -p $DESTDIR/usr/share/$PACKAGE
24 cp *.php *.css $DESTDIR/usr/share/$PACKAGE
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 cp -a $install/* $fs
31 }
33 post_install()
34 {
35 # Configure lighttpd server
36 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
37 if ! grep -q /usr/share/phproxy/ $1/etc/lighttpd/lighttpd.conf; then
38 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phproxy/" => "/usr/share/phproxy/",|g' -i $1/etc/lighttpd/lighttpd.conf
39 if [ -z "$1" ]; then
40 # Start Web server.
41 /etc/init.d/lighttpd stop
42 /etc/init.d/lighttpd start
43 fi
44 fi
45 fi
46 # Configure apache server
47 if [ -f $1/etc/apache/httpd.conf ]; then
48 if [ ! -f $1/etc/apache/conf.d/phproxy ]; then
49 cat > $1/etc/apache/conf.d/phproxy <<EOT
50 <IfModule mod_alias.c>
51 Alias /phproxy /usr/share/phproxy
52 </IfModule>
53 <Directory /usr/share/phproxy/>
54 DirectoryIndex index.php
55 Options +FollowSymLinks
56 AllowOverride None
57 Order allow,deny
58 Allow from all
59 </Directory>
60 EOT
61 if [ -z "$1" ]; then
62 # Start Web server.
63 /etc/init.d/apache stop
64 /etc/init.d/apache start
65 fi
66 fi
67 fi
68 }