wok view zerobin/receipt @ rev 14967
Up: firefox-langpack-fr (17.0.8esr)
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Thu Aug 08 22:19:58 2013 +0200 (2013-08-08) |
parents | 30f393e65a4c |
children | 7c9b40764925 |
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 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"
13 SUGGESTED="php-gd"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 patch -p0 < $stuff/zerobin.u
20 find css js lib tpl -type f | xargs dos2unix *.*
21 }
23 # Rules to gen a SliTaz package suitable for Tazpkg.
24 genpkg_rules()
25 {
26 mkdir -p $fs/usr/share/zerobin
27 mkdir -p $fs/var/lib/zerobin/data $fs/var/lib/zerobin/tmp
28 cp -a $src/* $fs/usr/share/zerobin
29 cp $stuff/purge.sh $fs/var/lib/zerobin/data
30 ln -s /var/lib/zerobin/data $fs/usr/share/zerobin/data
31 ln -s /var/lib/zerobin/tmp $fs/usr/share/zerobin/tmp
32 chown -R www.www $fs/usr/share/zerobin $fs/var/lib/zerobin/*
33 }
35 # Post and pre install commands
36 post_install()
37 {
38 # Configure lighttpd server
39 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
40 if ! grep -q /usr/share/zerobin/ $1/etc/lighttpd/lighttpd.conf; then
41 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/paste/" => "/usr/share/zerobin/",|g' -i $1/etc/lighttpd/lighttpd.conf
42 if [ -z "$1" ]; then
43 # Start Web server.
44 /etc/init.d/lighttpd stop
45 /etc/init.d/lighttpd start
46 fi
47 fi
48 fi
49 # Configure apache server
50 if [ -f $1/etc/apache/httpd.conf ]; then
51 sed -i 's/lighttpd/apache/' $1/etc/rcS.conf
52 if [ ! -f $1/etc/apache/conf.d/zerobin ]; then
53 cat > $1/etc/apache/conf.d/zerobin <<EOT
54 <IfModule mod_alias.c>
55 Alias /paste /usr/share/zerobin/
56 </IfModule>
57 <DirectoryMatch /usr/share/zerobin/>
58 php_value upload_max_filesize 2147483647
59 DirectoryIndex index.php
60 AllowOverride None
61 Order allow,deny
62 Allow from all
63 </DirectoryMatch>
64 EOT
65 if [ -z "$1" ]; then
66 # Start Web server.
67 /etc/init.d/apache restart
68 fi
69 fi
70 fi
71 }