wok-undigest annotate zerobin/receipt @ rev 688

Up zerobin (0.13_alpha)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Apr 19 08:11:22 2012 +0200 (2012-04-19)
parents 7a644e6e7b18
children a6af485e996d
rev   line source
pascal@683 1 # SliTaz package receipt.
pascal@683 2
pascal@683 3 PACKAGE="zerobin"
pascal@688 4 VERSION="0.13_alpha"
pascal@683 5 CATEGORY="network"
pascal@683 6 SHORT_DESC="Online pastebin where the server has zero knowledge of pasted data."
pascal@683 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@683 8 TARBALL="${PACKAGE}_$VERSION.zip"
pascal@683 9 WEB_SITE="http://sebsauvage.net/wiki/doku.php?id=php:zerobin"
pascal@683 10 WGET_URL="http://sebsauvage.net/files/$TARBALL"
pascal@683 11
pascal@688 12 DEPENDS="php-gd"
pascal@683 13
pascal@683 14 # Rules to configure and make the package.
pascal@683 15 compile_rules()
pascal@683 16 {
pascal@683 17 cd $src
pascal@687 18 #patch -p0 < $stuff/zerobin.u
pascal@687 19 dos2unix *.txt *.php tpl/*.html lib/*.js lib/*.php lib/*.css
pascal@683 20 }
pascal@683 21
pascal@683 22 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@683 23 genpkg_rules()
pascal@683 24 {
pascal@683 25 mkdir -p $fs/usr/share/zerobin
pascal@683 26 cp -a $src/* $fs/usr/share/zerobin
pascal@683 27 chown -R www.www $fs/usr/share/zerobin
pascal@683 28 }
pascal@683 29
pascal@683 30 # Post and pre install commands
pascal@683 31 post_install()
pascal@683 32 {
pascal@683 33 # Configure lighttpd server
pascal@683 34 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
pascal@683 35 if ! grep -q /usr/share/zerobin/ $1/etc/lighttpd/lighttpd.conf; then
pascal@683 36 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/paste/" => "/usr/share/zerobin/",|g' -i $1/etc/lighttpd/lighttpd.conf
pascal@683 37 if [ -z "$1" ]; then
pascal@683 38 # Start Web server.
pascal@683 39 /etc/init.d/lighttpd stop
pascal@683 40 /etc/init.d/lighttpd start
pascal@683 41 fi
pascal@683 42 fi
pascal@683 43 fi
pascal@683 44 # Configure apache server
pascal@683 45 if [ -f $1/etc/apache/httpd.conf ]; then
pascal@683 46 sed -i 's/lighttpd/apache/' $1/etc/rcS.conf
pascal@683 47 if [ ! -f $1/etc/apache/conf.d/zerobin ]; then
pascal@683 48 cat > $1/etc/apache/conf.d/zerobin <<EOT
pascal@683 49 <IfModule mod_alias.c>
pascal@683 50 Alias /paste /usr/share/zerobin/
pascal@683 51 </IfModule>
pascal@683 52 <DirectoryMatch /usr/share/zerobin/>
pascal@683 53 php_value upload_max_filesize 2147483647
pascal@683 54 DirectoryIndex index.php
pascal@683 55 AllowOverride None
pascal@683 56 Order allow,deny
pascal@683 57 Allow from all
pascal@683 58 </DirectoryMatch>
pascal@683 59 EOT
pascal@683 60 if [ -z "$1" ]; then
pascal@683 61 # Start Web server.
pascal@683 62 /etc/init.d/apache restart
pascal@683 63 fi
pascal@683 64 fi
pascal@683 65 fi
pascal@683 66 }