wok-next annotate zerobin/receipt @ rev 16812

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