wok diff phproxy/receipt @ rev 14257

syslinux/iso2exe: check kernel version, add floppy bootstrap stub
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Mar 28 11:51:42 2013 +0100 (2013-03-28)
parents
children 78cb1e930abd
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/phproxy/receipt	Thu Mar 28 11:51:42 2013 +0100
     1.3 @@ -0,0 +1,68 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="phproxy"
     1.7 +SOURCE="PHProxy"
     1.8 +VERSION="0.5b2"
     1.9 +CATEGORY="network"
    1.10 +SHORT_DESC="A proxy HTTP."
    1.11 +MAINTAINER="pascal.bellard@slitaz.org"
    1.12 +WEB_SITE="http://sebsauvage.net/wiki/doku.php?id=phproxy"
    1.13 +TARBALL="$SOURCE%20$VERSION%20mod%20SSE+ARKA%2020100825.7z"
    1.14 +WGET_URL="http://sebsauvage.net/temp/$TARBALL"
    1.15 +
    1.16 +DEPENDS="php"
    1.17 +BUILD_DEPENDS="p7zip"
    1.18 +
    1.19 +# Rules to configure and make the package.
    1.20 +compile_rules()
    1.21 +{
    1.22 +	cd $src
    1.23 +	7zr x $TARBALL
    1.24 +	cd $SOURCE\ *
    1.25 +	dos2unix *
    1.26 +	mkdir -p $DESTDIR/usr/share/$PACKAGE
    1.27 +	cp *.php *.css $DESTDIR/usr/share/$PACKAGE
    1.28 +}
    1.29 +
    1.30 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.31 +genpkg_rules()
    1.32 +{
    1.33 +	cp -a $install/* $fs
    1.34 +}
    1.35 +
    1.36 +post_install()
    1.37 +{
    1.38 +	# Configure lighttpd server
    1.39 +	if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
    1.40 +		if ! grep -q /usr/share/phproxy/ $1/etc/lighttpd/lighttpd.conf; then
    1.41 +	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/phproxy/" => "/usr/share/phproxy/",|g' -i $1/etc/lighttpd/lighttpd.conf
    1.42 +			if [ -z "$1" ]; then
    1.43 +				# Start Web server.
    1.44 +				/etc/init.d/lighttpd stop
    1.45 +				/etc/init.d/lighttpd start
    1.46 +			fi
    1.47 +		fi
    1.48 +	fi
    1.49 +	# Configure apache server
    1.50 +	if [ -f $1/etc/apache/httpd.conf ]; then
    1.51 +		if [ ! -f $1/etc/apache/conf.d/phproxy ]; then
    1.52 +			cat > $1/etc/apache/conf.d/phproxy <<EOT
    1.53 +<IfModule mod_alias.c>
    1.54 +    Alias /phproxy /usr/share/phproxy
    1.55 +</IfModule>
    1.56 +<Directory /usr/share/phproxy/>
    1.57 +    DirectoryIndex index.php
    1.58 +    Options +FollowSymLinks
    1.59 +    AllowOverride None
    1.60 +    Order allow,deny
    1.61 +    Allow from all
    1.62 +</Directory>
    1.63 +EOT
    1.64 +			if [ -z "$1" ]; then
    1.65 +				# Start Web server.
    1.66 +				/etc/init.d/apache stop
    1.67 +				/etc/init.d/apache start
    1.68 +			fi
    1.69 +		fi
    1.70 +	fi
    1.71 +}