wok annotate phproxy/receipt @ rev 25006
updated ntp (4.2.8.p13 -> 4.2.8.p15)
author | Hans-G?nter Theisgen |
---|---|
date | Mon May 16 16:37:26 2022 +0100 (2022-05-16) |
parents | a78610b2eb47 |
children |
rev | line source |
---|---|
pascal@13740 | 1 # SliTaz package receipt. |
pascal@13740 | 2 |
pascal@13740 | 3 PACKAGE="phproxy" |
pascal@13740 | 4 SOURCE="PHProxy" |
pascal@13740 | 5 VERSION="0.5b2" |
pascal@13740 | 6 CATEGORY="network" |
pascal@13740 | 7 SHORT_DESC="A proxy HTTP." |
pascal@13740 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15198 | 9 LICENSE="GPL2" |
pascal@20669 | 10 WEB_SITE="https://sebsauvage.net/wiki/doku.php?id=phproxy" |
pascal@13740 | 11 TARBALL="$SOURCE%20$VERSION%20mod%20SSE+ARKA%2020100825.7z" |
pascal@20669 | 12 WGET_URL="https://sebsauvage.net/temp/$TARBALL" |
pankso@16349 | 13 #HOST_ARCH="any" |
pascal@13740 | 14 |
pascal@13740 | 15 DEPENDS="php" |
pascal@13740 | 16 BUILD_DEPENDS="p7zip" |
pascal@13740 | 17 |
pascal@24102 | 18 current_version() |
pascal@24102 | 19 { |
pascal@24102 | 20 wget -O - "$WEB_SITE" 2>/dev/null | \ |
pascal@24102 | 21 sed '/PHProxy/!d;s|.*PHProxy ||;s| .*||;q' |
pascal@24102 | 22 } |
pascal@24102 | 23 |
pascal@13740 | 24 # Rules to configure and make the package. |
pascal@13740 | 25 compile_rules() |
pascal@13740 | 26 { |
pascal@13740 | 27 dos2unix * |
pascal@13740 | 28 mkdir -p $DESTDIR/usr/share/$PACKAGE |
pascal@13740 | 29 cp *.php *.css $DESTDIR/usr/share/$PACKAGE |
pascal@13740 | 30 } |
pascal@13740 | 31 |
pascal@13740 | 32 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@13740 | 33 genpkg_rules() |
pascal@13740 | 34 { |
pascal@13740 | 35 cp -a $install/* $fs |
pascal@13740 | 36 } |
pascal@19689 | 37 |
pascal@13740 | 38 post_install() |
pascal@13740 | 39 { |
pascal@13740 | 40 # Configure lighttpd server |
pascal@18730 | 41 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@18730 | 42 if ! grep -q /usr/share/phproxy/ "$1/etc/lighttpd/lighttpd.conf"; then |
pascal@18730 | 43 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phproxy/" => "/usr/share/phproxy/",|g' -i "$1/etc/lighttpd/lighttpd.conf" |
pascal@13740 | 44 if [ -z "$1" ]; then |
pascal@13740 | 45 # Start Web server. |
pascal@13740 | 46 /etc/init.d/lighttpd stop |
pascal@13740 | 47 /etc/init.d/lighttpd start |
pascal@13740 | 48 fi |
pascal@13740 | 49 fi |
pascal@13740 | 50 fi |
pascal@13740 | 51 # Configure apache server |
pascal@18730 | 52 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@18730 | 53 if [ ! -f "$1/etc/apache/conf.d/phproxy" ]; then |
pascal@18730 | 54 cat > "$1/etc/apache/conf.d/phproxy" <<EOT |
pascal@13740 | 55 <IfModule mod_alias.c> |
pascal@13740 | 56 Alias /phproxy /usr/share/phproxy |
pascal@13740 | 57 </IfModule> |
pascal@13740 | 58 <Directory /usr/share/phproxy/> |
pascal@13740 | 59 DirectoryIndex index.php |
pascal@13740 | 60 Options +FollowSymLinks |
pascal@13740 | 61 AllowOverride None |
pascal@13740 | 62 Order allow,deny |
pascal@13740 | 63 Allow from all |
pascal@13740 | 64 </Directory> |
pascal@13740 | 65 EOT |
pascal@13740 | 66 if [ -z "$1" ]; then |
pascal@13740 | 67 # Start Web server. |
pascal@13740 | 68 /etc/init.d/apache stop |
pascal@13740 | 69 /etc/init.d/apache start |
pascal@13740 | 70 fi |
pascal@13740 | 71 fi |
pascal@13740 | 72 fi |
pascal@13740 | 73 } |