wok-next view zerobin/receipt @ rev 21721

created recipes for efivar and efibootmgr
author Hans-G?nter Theisgen
date Tue Sep 01 10:09:15 2020 +0100 (2020-09-01)
parents d5aab818505e
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="zerobin"
4 VERSION="0.19"
5 COMMIT="8ec0948"
6 CATEGORY="network"
7 SHORT_DESC="Online pastebin where the server has zero knowledge of pasted data \
8 [ unmaintained, consider switch to privatebin ]"
9 MAINTAINER="pascal.bellard@slitaz.org"
10 LICENSE="zlib/libpng"
11 WEB_SITE="https://sebsauvage.net/wiki/doku.php?id=php:zerobin"
12 HOST_ARCH="any"
14 TARBALL="$PACKAGE-${COMMIT:-VERSION}.tar.gz"
15 WGET_URL="https://github.com/sebsauvage/ZeroBin/archive/${COMMIT:-VERSION}.tar.gz"
17 DEPENDS_std="php"
18 SUGGESTED_std="php-gd"
19 TAGS_std="pastebin privacy"
21 compile_rules() {
22 mkdir -p \
23 $install/usr/share/zerobin/ \
24 $install/var/lib/zerobin/data/ \
25 $install/var/lib/zerobin/tmp/
26 cp -a $src/* $install/usr/share/zerobin/
27 cp $stuff/purge.sh $install/var/lib/zerobin/data/
28 ln -s /var/lib/zerobin/data $install/usr/share/zerobin/data
29 ln -s /var/lib/zerobin/tmp $install/usr/share/zerobin/tmp
30 chown -R www.www $install/usr/share/zerobin/ $install/var/lib/zerobin/*
32 fix symlinks
33 find $install -exec chmod g-w '{}' \;
34 }
36 post_install() {
37 # Configure lighttpd server
38 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
39 if ! grep -q /usr/share/zerobin/ "$1/etc/lighttpd/lighttpd.conf"; then
40 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/paste/" => "/usr/share/zerobin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
41 if [ -z "$1" ]; then
42 # Start Web server.
43 /etc/init.d/lighttpd stop
44 /etc/init.d/lighttpd start
45 fi
46 fi
47 fi
48 # Configure apache server
49 if [ -f "$1/etc/apache/httpd.conf" ]; then
50 sed -i 's/lighttpd/apache/' "$1/etc/rcS.conf"
51 if [ ! -f "$1/etc/apache/conf.d/zerobin" ]; then
52 cat > "$1/etc/apache/conf.d/zerobin" <<EOT
53 <IfModule mod_alias.c>
54 Alias /paste /usr/share/zerobin/
55 </IfModule>
56 <DirectoryMatch /usr/share/zerobin/>
57 php_value upload_max_filesize 2147483647
58 DirectoryIndex index.php
59 AllowOverride None
60 Order allow,deny
61 Allow from all
62 </DirectoryMatch>
63 EOT
64 if [ -z "$1" ]; then
65 # Start Web server.
66 /etc/init.d/apache restart
67 fi
68 fi
69 fi
70 }