wok-6.x view phproxy/receipt @ rev 19687
fix phproxy
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 12 17:16:31 2017 +0100 (2017-02-12) |
parents | 9e01bc6321ea |
children | 775714eeb4c8 |
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"
13 #HOST_ARCH="any"
15 DEPENDS="php"
16 BUILD_DEPENDS="p7zip"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 dos2unix *
22 mkdir -p $DESTDIR/usr/share/$PACKAGE
23 cp *.php *.css $DESTDIR/usr/share/$PACKAGE
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 cp -a $install/* $fs
30 }
31 post_install()
32 {
33 # Configure lighttpd server
34 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
35 if ! grep -q /usr/share/phproxy/ "$1/etc/lighttpd/lighttpd.conf"; then
36 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phproxy/" => "/usr/share/phproxy/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
37 if [ -z "$1" ]; then
38 # Start Web server.
39 /etc/init.d/lighttpd stop
40 /etc/init.d/lighttpd start
41 fi
42 fi
43 fi
44 # Configure apache server
45 if [ -f "$1/etc/apache/httpd.conf" ]; then
46 if [ ! -f "$1/etc/apache/conf.d/phproxy" ]; then
47 cat > "$1/etc/apache/conf.d/phproxy" <<EOT
48 <IfModule mod_alias.c>
49 Alias /phproxy /usr/share/phproxy
50 </IfModule>
51 <Directory /usr/share/phproxy/>
52 DirectoryIndex index.php
53 Options +FollowSymLinks
54 AllowOverride None
55 Order allow,deny
56 Allow from all
57 </Directory>
58 EOT
59 if [ -z "$1" ]; then
60 # Start Web server.
61 /etc/init.d/apache stop
62 /etc/init.d/apache start
63 fi
64 fi
65 fi
66 }