wok-next annotate zerobin/receipt @ rev 21722

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