wok-6.x view zerobin/receipt @ rev 22677

linld: fix pipehole.awk
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jan 18 11:53:11 2020 +0100 (2020-01-18)
parents 139df21c10dd
children 922f061231c2
line source
1 # SliTaz package receipt.
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 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="https://sebsauvage.net/wiki/doku.php?id=php:zerobin"
12 WGET_URL="https://github.com/sebsauvage/ZeroBin/archive/$VERSION.tar.gz"
13 HOST_ARCH="any"
15 DEPENDS="php"
16 SUGGESTED="php-gd"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 patch -p0 < $stuff/zerobin.u
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 }