wok-next view phproxy/receipt @ rev 15991
Up: prosody (0.9.3)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Mar 02 14:10:27 2014 +0100 (2014-03-02) |
parents | 01dc32ea5178 |
children | d51b2411e55e |
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 LICENSE="GPL2"
10 WEB_SITE="http://sebsauvage.net/wiki/doku.php?id=phproxy"
11 TARBALL="$SOURCE%20$VERSION%20mod%20SSE+ARKA%2020100825.7z"
12 WGET_URL="http://sebsauvage.net/temp/$TARBALL"
14 DEPENDS="php"
15 BUILD_DEPENDS="p7zip"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 7zr x $TARBALL
22 cd $SOURCE\ *
23 dos2unix *
24 mkdir -p $DESTDIR/usr/share/$PACKAGE
25 cp *.php *.css $DESTDIR/usr/share/$PACKAGE
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 cp -a $install/* $fs
32 }
34 post_install()
35 {
36 # Configure lighttpd server
37 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
38 if ! grep -q /usr/share/phproxy/ $1/etc/lighttpd/lighttpd.conf; then
39 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phproxy/" => "/usr/share/phproxy/",|g' -i $1/etc/lighttpd/lighttpd.conf
40 if [ -z "$1" ]; then
41 # Start Web server.
42 /etc/init.d/lighttpd stop
43 /etc/init.d/lighttpd start
44 fi
45 fi
46 fi
47 # Configure apache server
48 if [ -f $1/etc/apache/httpd.conf ]; then
49 if [ ! -f $1/etc/apache/conf.d/phproxy ]; then
50 cat > $1/etc/apache/conf.d/phproxy <<EOT
51 <IfModule mod_alias.c>
52 Alias /phproxy /usr/share/phproxy
53 </IfModule>
54 <Directory /usr/share/phproxy/>
55 DirectoryIndex index.php
56 Options +FollowSymLinks
57 AllowOverride None
58 Order allow,deny
59 Allow from all
60 </Directory>
61 EOT
62 if [ -z "$1" ]; then
63 # Start Web server.
64 /etc/init.d/apache stop
65 /etc/init.d/apache start
66 fi
67 fi
68 fi
69 }