wok-next view zerobin/receipt @ rev 20842
p11-kit: update (b)deps
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Jun 20 17:49:39 2018 +0300 (2018-06-20) |
parents | e1076259a437 |
children | d5aab818505e |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="zerobin"
4 GITHASH="8cae64d6eab99fb0d31868df77846285c0958ed0" # 6 feb 2014
5 VERSION="${GITHASH:0:7}"
6 CATEGORY="network"
7 SHORT_DESC="Online pastebin where the server has zero knowledge of pasted data."
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="zlib/libpng"
10 WEB_SITE="http://sebsauvage.net/wiki/doku.php?id=php:zerobin"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://github.com/sebsauvage/ZeroBin/archive/$VERSION.tar.gz"
15 compile_rules() {
16 mkdir -p \
17 $install/usr/share/zerobin/ \
18 $install/var/lib/zerobin/data/ \
19 $install/var/lib/zerobin/tmp/
20 cp -a $src/* $install/usr/share/zerobin/
21 cp $stuff/purge.sh $install/var/lib/zerobin/data/
22 ln -s /var/lib/zerobin/data $install/usr/share/zerobin/data
23 ln -s /var/lib/zerobin/tmp $install/usr/share/zerobin/tmp
24 chown -R www.www $install/usr/share/zerobin $install/var/lib/zerobin/*
25 }
27 genpkg_rules() {
28 copy @std
29 DEPENDS="php"
30 SUGGESTED="php-gd"
31 }
33 post_install() {
34 # Configure lighttpd server
35 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
36 if ! grep -q /usr/share/zerobin/ "$1/etc/lighttpd/lighttpd.conf"; then
37 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/paste/" => "/usr/share/zerobin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
38 if [ -z "$1" ]; then
39 # Start Web server.
40 /etc/init.d/lighttpd stop
41 /etc/init.d/lighttpd start
42 fi
43 fi
44 fi
45 # Configure apache server
46 if [ -f "$1/etc/apache/httpd.conf" ]; then
47 sed -i 's/lighttpd/apache/' "$1/etc/rcS.conf"
48 if [ ! -f "$1/etc/apache/conf.d/zerobin" ]; then
49 cat > "$1/etc/apache/conf.d/zerobin" <<EOT
50 <IfModule mod_alias.c>
51 Alias /paste /usr/share/zerobin/
52 </IfModule>
53 <DirectoryMatch /usr/share/zerobin/>
54 php_value upload_max_filesize 2147483647
55 DirectoryIndex index.php
56 AllowOverride None
57 Order allow,deny
58 Allow from all
59 </DirectoryMatch>
60 EOT
61 if [ -z "$1" ]; then
62 # Start Web server.
63 /etc/init.d/apache restart
64 fi
65 fi
66 fi
67 }