wok-next annotate phproxy/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | c4e53a39395a |
children | 262dccc5e3ed |
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" |
al@21020 | 7 SHORT_DESC="A proxy HTTP" |
pascal@13740 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15198 | 9 LICENSE="GPL2" |
pascal@13740 | 10 WEB_SITE="http://sebsauvage.net/wiki/doku.php?id=phproxy" |
al@21020 | 11 |
pascal@13740 | 12 TARBALL="$SOURCE%20$VERSION%20mod%20SSE+ARKA%2020100825.7z" |
pascal@13740 | 13 WGET_URL="http://sebsauvage.net/temp/$TARBALL" |
pascal@13740 | 14 |
pascal@20268 | 15 BUILD_DEPENDS="p7zip" |
pascal@13740 | 16 |
al@21020 | 17 compile_rules() { |
pascal@13740 | 18 dos2unix * |
al@21020 | 19 mkdir -p $install/usr/share/$PACKAGE |
al@21020 | 20 cp *.php *.css $install/usr/share/$PACKAGE |
pascal@13740 | 21 } |
pascal@13740 | 22 |
al@21020 | 23 genpkg_rules() { |
pascal@13740 | 24 cp -a $install/* $fs |
al@21020 | 25 DEPENDS="php" |
pascal@13740 | 26 } |
pascal@13740 | 27 |
al@21020 | 28 post_install() { |
pascal@13740 | 29 # Configure lighttpd server |
pascal@18730 | 30 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@18730 | 31 if ! grep -q /usr/share/phproxy/ "$1/etc/lighttpd/lighttpd.conf"; then |
al@21020 | 32 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 | 33 if [ -z "$1" ]; then |
pascal@13740 | 34 # Start Web server. |
pascal@13740 | 35 /etc/init.d/lighttpd stop |
pascal@13740 | 36 /etc/init.d/lighttpd start |
pascal@13740 | 37 fi |
pascal@13740 | 38 fi |
pascal@13740 | 39 fi |
pascal@13740 | 40 # Configure apache server |
pascal@18730 | 41 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@18730 | 42 if [ ! -f "$1/etc/apache/conf.d/phproxy" ]; then |
pascal@18730 | 43 cat > "$1/etc/apache/conf.d/phproxy" <<EOT |
pascal@13740 | 44 <IfModule mod_alias.c> |
pascal@13740 | 45 Alias /phproxy /usr/share/phproxy |
pascal@13740 | 46 </IfModule> |
pascal@13740 | 47 <Directory /usr/share/phproxy/> |
pascal@13740 | 48 DirectoryIndex index.php |
pascal@13740 | 49 Options +FollowSymLinks |
pascal@13740 | 50 AllowOverride None |
pascal@13740 | 51 Order allow,deny |
pascal@13740 | 52 Allow from all |
pascal@13740 | 53 </Directory> |
pascal@13740 | 54 EOT |
pascal@13740 | 55 if [ -z "$1" ]; then |
pascal@13740 | 56 # Start Web server. |
pascal@13740 | 57 /etc/init.d/apache stop |
pascal@13740 | 58 /etc/init.d/apache start |
pascal@13740 | 59 fi |
pascal@13740 | 60 fi |
pascal@13740 | 61 fi |
pascal@13740 | 62 } |