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