wok diff zerobin/receipt @ rev 13109

Up: gmime to 2.6.7.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Jun 26 19:16:26 2012 +0000 (2012-06-26)
parents
children 2eb82e8dc17d
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/zerobin/receipt	Tue Jun 26 19:16:26 2012 +0000
     1.3 @@ -0,0 +1,67 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="zerobin"
     1.7 +VERSION="0.15_alpha"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="Online pastebin where the server has zero knowledge of pasted data."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +TARBALL="${PACKAGE}_$VERSION.zip"
    1.12 +WEB_SITE="http://sebsauvage.net/wiki/doku.php?id=php:zerobin"
    1.13 +WGET_URL="http://sebsauvage.net/files/$TARBALL"
    1.14 +
    1.15 +DEPENDS="php"
    1.16 +SUGGESTED="php-gd"
    1.17 +
    1.18 +# Rules to configure and make the package.
    1.19 +compile_rules()
    1.20 +{
    1.21 +	cd $src
    1.22 +	patch -p0 < $stuff/zerobin.u
    1.23 +	dos2unix *.txt *.php tpl/*.html lib/*.js lib/*.php lib/*.css
    1.24 +}
    1.25 +
    1.26 +# Rules to gen a SliTaz package suitable for Tazpkg.   
    1.27 +genpkg_rules()                                      
    1.28 +{
    1.29 +	mkdir -p $fs/usr/share/zerobin
    1.30 +	cp -a $src/* $fs/usr/share/zerobin
    1.31 +	chown -R www.www $fs/usr/share/zerobin
    1.32 +}
    1.33 +
    1.34 +# Post and pre install commands
    1.35 +post_install()
    1.36 +{
    1.37 +	# Configure lighttpd server
    1.38 +	if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
    1.39 +		if ! grep -q /usr/share/zerobin/ $1/etc/lighttpd/lighttpd.conf; then
    1.40 +	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/paste/" => "/usr/share/zerobin/",|g' -i $1/etc/lighttpd/lighttpd.conf
    1.41 +			if [ -z "$1" ]; then
    1.42 +				# Start Web server.
    1.43 +				/etc/init.d/lighttpd stop
    1.44 +				/etc/init.d/lighttpd start
    1.45 +			fi
    1.46 +		fi
    1.47 +	fi
    1.48 +	# Configure apache server
    1.49 +	if [ -f $1/etc/apache/httpd.conf ]; then
    1.50 +		sed -i 's/lighttpd/apache/' $1/etc/rcS.conf
    1.51 +		if [ ! -f $1/etc/apache/conf.d/zerobin ]; then
    1.52 +			cat > $1/etc/apache/conf.d/zerobin <<EOT
    1.53 +<IfModule mod_alias.c>
    1.54 +    Alias /paste /usr/share/zerobin/
    1.55 +</IfModule>
    1.56 +<DirectoryMatch /usr/share/zerobin/>
    1.57 +    php_value upload_max_filesize 2147483647 
    1.58 +    DirectoryIndex index.php
    1.59 +    AllowOverride None
    1.60 +    Order allow,deny
    1.61 +    Allow from all
    1.62 +</DirectoryMatch>
    1.63 +EOT
    1.64 +			if [ -z "$1" ]; then
    1.65 +				# Start Web server.
    1.66 +				/etc/init.d/apache restart
    1.67 +			fi
    1.68 +		fi
    1.69 +	fi
    1.70 +}