wok-next view phproxy/receipt @ rev 20513

A lot of tiny edits; remove wget and pkg-build from $BUILD_DEPENDS and from *-dev packages $DEPENDS.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Mar 21 15:58:17 2018 +0200 (2018-03-21)
parents 598d89f86dbf
children d5aab818505e
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 dos2unix *
21 mkdir -p $DESTDIR/usr/share/$PACKAGE
22 cp *.php *.css $DESTDIR/usr/share/$PACKAGE
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 cp -a $install/* $fs
29 }
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 }