wok view phproxy/receipt @ rev 25734

updated sc-im (-> 0.8.4)
author Hans-G?nter Theisgen
date Thu Aug 22 14:48:42 2024 +0100 (4 months ago)
parents a78610b2eb47
children
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="https://sebsauvage.net/wiki/doku.php?id=phproxy"
11 TARBALL="$SOURCE%20$VERSION%20mod%20SSE+ARKA%2020100825.7z"
12 WGET_URL="https://sebsauvage.net/temp/$TARBALL"
13 #HOST_ARCH="any"
15 DEPENDS="php"
16 BUILD_DEPENDS="p7zip"
18 current_version()
19 {
20 wget -O - "$WEB_SITE" 2>/dev/null | \
21 sed '/PHProxy/!d;s|.*PHProxy ||;s| .*||;q'
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 dos2unix *
28 mkdir -p $DESTDIR/usr/share/$PACKAGE
29 cp *.php *.css $DESTDIR/usr/share/$PACKAGE
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 cp -a $install/* $fs
36 }
38 post_install()
39 {
40 # Configure lighttpd server
41 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
42 if ! grep -q /usr/share/phproxy/ "$1/etc/lighttpd/lighttpd.conf"; then
43 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phproxy/" => "/usr/share/phproxy/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
44 if [ -z "$1" ]; then
45 # Start Web server.
46 /etc/init.d/lighttpd stop
47 /etc/init.d/lighttpd start
48 fi
49 fi
50 fi
51 # Configure apache server
52 if [ -f "$1/etc/apache/httpd.conf" ]; then
53 if [ ! -f "$1/etc/apache/conf.d/phproxy" ]; then
54 cat > "$1/etc/apache/conf.d/phproxy" <<EOT
55 <IfModule mod_alias.c>
56 Alias /phproxy /usr/share/phproxy
57 </IfModule>
58 <Directory /usr/share/phproxy/>
59 DirectoryIndex index.php
60 Options +FollowSymLinks
61 AllowOverride None
62 Order allow,deny
63 Allow from all
64 </Directory>
65 EOT
66 if [ -z "$1" ]; then
67 # Start Web server.
68 /etc/init.d/apache stop
69 /etc/init.d/apache start
70 fi
71 fi
72 fi
73 }