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