wok-next view privatebin/receipt @ rev 21469

updated tinc (1.0.25 -> 1.0.36)
author Hans-G?nter Theisgen
date Wed May 13 07:41:00 2020 +0100 (2020-05-13)
parents
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="privatebin"
4 VERSION="1.2.1"
5 CATEGORY="network"
6 SHORT_DESC="Online pastebin where the server has zero knowledge of pasted data"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="zlib/libpng GPL2 BSD MIT Apache CC-BY"
9 WEB_SITE="https://privatebin.info/"
10 HOST_ARCH="any"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://github.com/PrivateBin/PrivateBin/archive/$VERSION.tar.gz"
15 DEPENDS_std="php php-gd"
16 CONFIG_FILES_std="/etc/privatebin/conf.php"
17 TAGS_std="pastebin privacy"
19 compile_rules() {
20 mkdir -p $install/usr/share/privatebin
21 cp -R * $install/usr/share/privatebin
23 mkdir -p $install/etc/
24 mv $install/usr/share/privatebin/cfg \
25 $install/etc/privatebin/
26 ln -s /etc/privatebin $install/usr/share/privatebin/cfg
27 cp $install/etc/privatebin/conf.sample.php $install/etc/privatebin/conf.php
29 # data and runtime folders
30 for i in model purgelimit trafficlimits; do
31 mkdir -p $install/var/lib/privatebin/$i
32 done
33 chown -R www.www $install/var/lib/privatebin/*
35 cook_pick_docs *.md
37 fix symlinks
38 }
40 post_install() {
41 # Configure lighttpd server
42 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
43 if ! grep -q /usr/share/privatebin/ "$1/etc/lighttpd/lighttpd.conf"; then
44 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/paste/" => "/usr/share/privatebin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
45 if [ -z "$1" ]; then
46 # Start Web server.
47 /etc/init.d/lighttpd stop
48 /etc/init.d/lighttpd start
49 fi
50 fi
51 fi
53 # Configure apache server
54 if [ -f "$1/etc/apache/httpd.conf" ]; then
55 sed -i 's/lighttpd/apache/' "$1/etc/rcS.conf"
56 if [ ! -f "$1/etc/apache/conf.d/pastebin" ]; then
57 cat > "$1/etc/apache/conf.d/pastebin" <<EOT
58 <IfModule mod_alias.c>
59 Alias /paste /usr/share/pastebin/
60 </IfModule>
61 <DirectoryMatch /usr/share/pastebin/>
62 php_value upload_max_filesize 2147483647
63 DirectoryIndex index.php
64 AllowOverride None
65 Order allow,deny
66 Allow from all
67 </DirectoryMatch>
68 EOT
70 # Start Web server.
71 [ -n "$1" ] || /etc/init.d/apache restart
72 fi
73 fi
74 }