wok annotate phproxy/receipt @ rev 13916
Add libXaw3dXft
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jan 25 10:52:31 2013 +0100 (2013-01-25) |
parents | |
children | 78cb1e930abd |
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@13740 | 9 WEB_SITE="http://sebsauvage.net/wiki/doku.php?id=phproxy" |
pascal@13740 | 10 TARBALL="$SOURCE%20$VERSION%20mod%20SSE+ARKA%2020100825.7z" |
pascal@13740 | 11 WGET_URL="http://sebsauvage.net/temp/$TARBALL" |
pascal@13740 | 12 |
pascal@13740 | 13 DEPENDS="php" |
pascal@13740 | 14 BUILD_DEPENDS="p7zip" |
pascal@13740 | 15 |
pascal@13740 | 16 # Rules to configure and make the package. |
pascal@13740 | 17 compile_rules() |
pascal@13740 | 18 { |
pascal@13740 | 19 cd $src |
pascal@13740 | 20 7zr x $TARBALL |
pascal@13740 | 21 cd $SOURCE\ * |
pascal@13740 | 22 dos2unix * |
pascal@13740 | 23 mkdir -p $DESTDIR/usr/share/$PACKAGE |
pascal@13740 | 24 cp *.php *.css $DESTDIR/usr/share/$PACKAGE |
pascal@13740 | 25 } |
pascal@13740 | 26 |
pascal@13740 | 27 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@13740 | 28 genpkg_rules() |
pascal@13740 | 29 { |
pascal@13740 | 30 cp -a $install/* $fs |
pascal@13740 | 31 } |
pascal@13740 | 32 |
pascal@13740 | 33 post_install() |
pascal@13740 | 34 { |
pascal@13740 | 35 # Configure lighttpd server |
pascal@13740 | 36 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@13740 | 37 if ! grep -q /usr/share/phproxy/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@13740 | 38 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 | 39 if [ -z "$1" ]; then |
pascal@13740 | 40 # Start Web server. |
pascal@13740 | 41 /etc/init.d/lighttpd stop |
pascal@13740 | 42 /etc/init.d/lighttpd start |
pascal@13740 | 43 fi |
pascal@13740 | 44 fi |
pascal@13740 | 45 fi |
pascal@13740 | 46 # Configure apache server |
pascal@13740 | 47 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@13740 | 48 if [ ! -f $1/etc/apache/conf.d/phproxy ]; then |
pascal@13740 | 49 cat > $1/etc/apache/conf.d/phproxy <<EOT |
pascal@13740 | 50 <IfModule mod_alias.c> |
pascal@13740 | 51 Alias /phproxy /usr/share/phproxy |
pascal@13740 | 52 </IfModule> |
pascal@13740 | 53 <Directory /usr/share/phproxy/> |
pascal@13740 | 54 DirectoryIndex index.php |
pascal@13740 | 55 Options +FollowSymLinks |
pascal@13740 | 56 AllowOverride None |
pascal@13740 | 57 Order allow,deny |
pascal@13740 | 58 Allow from all |
pascal@13740 | 59 </Directory> |
pascal@13740 | 60 EOT |
pascal@13740 | 61 if [ -z "$1" ]; then |
pascal@13740 | 62 # Start Web server. |
pascal@13740 | 63 /etc/init.d/apache stop |
pascal@13740 | 64 /etc/init.d/apache start |
pascal@13740 | 65 fi |
pascal@13740 | 66 fi |
pascal@13740 | 67 fi |
pascal@13740 | 68 } |