wok annotate zerobin/receipt @ rev 25625
Add opendkim (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 08 17:14:09 2023 +0000 (12 months ago) |
parents | a78610b2eb47 |
children |
rev | line source |
---|---|
pascal@12906 | 1 # SliTaz package receipt. |
pascal@12906 | 2 |
pascal@12906 | 3 PACKAGE="zerobin" |
pascal@18735 | 4 GITHASH="8cae64d6eab99fb0d31868df77846285c0958ed0" # 6 feb 2014 |
pascal@18735 | 5 VERSION="${GITHASH:0:7}" |
pascal@12906 | 6 CATEGORY="network" |
pascal@12906 | 7 SHORT_DESC="Online pastebin where the server has zero knowledge of pasted data." |
pascal@12906 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15185 | 9 LICENSE="zlib/libpng" |
pascal@18735 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@20669 | 11 WEB_SITE="https://sebsauvage.net/wiki/doku.php?id=php:zerobin" |
pascal@18735 | 12 WGET_URL="https://github.com/sebsauvage/ZeroBin/archive/$VERSION.tar.gz" |
pascal@16264 | 13 HOST_ARCH="any" |
pascal@12906 | 14 |
pascal@12906 | 15 DEPENDS="php" |
pascal@12906 | 16 SUGGESTED="php-gd" |
pascal@12906 | 17 |
pascal@24304 | 18 # What is the latest version available today? |
pascal@24304 | 19 current_version() |
pascal@24304 | 20 { |
pascal@24304 | 21 wget -O - https://github.com/sebsauvage/ZeroBin/tags 2>/dev/null | \ |
pascal@24304 | 22 sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q' |
pascal@24304 | 23 } |
pascal@24304 | 24 |
pascal@12906 | 25 # Rules to configure and make the package. |
pascal@12906 | 26 compile_rules() |
pascal@12906 | 27 { |
pascal@12906 | 28 patch -p0 < $stuff/zerobin.u |
pascal@12906 | 29 } |
pascal@12906 | 30 |
pascal@12906 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@12906 | 32 genpkg_rules() |
pascal@12906 | 33 { |
pascal@12906 | 34 mkdir -p $fs/usr/share/zerobin |
pascal@13153 | 35 mkdir -p $fs/var/lib/zerobin/data $fs/var/lib/zerobin/tmp |
pascal@12906 | 36 cp -a $src/* $fs/usr/share/zerobin |
pascal@13153 | 37 cp $stuff/purge.sh $fs/var/lib/zerobin/data |
pascal@13153 | 38 ln -s /var/lib/zerobin/data $fs/usr/share/zerobin/data |
pascal@13153 | 39 ln -s /var/lib/zerobin/tmp $fs/usr/share/zerobin/tmp |
pascal@13153 | 40 chown -R www.www $fs/usr/share/zerobin $fs/var/lib/zerobin/* |
pascal@12906 | 41 } |
pascal@12906 | 42 |
pascal@12906 | 43 # Post and pre install commands |
pascal@12906 | 44 post_install() |
pascal@12906 | 45 { |
pascal@12906 | 46 # Configure lighttpd server |
pascal@18730 | 47 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@18730 | 48 if ! grep -q /usr/share/zerobin/ "$1/etc/lighttpd/lighttpd.conf"; then |
pascal@18730 | 49 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 | 50 if [ -z "$1" ]; then |
pascal@12906 | 51 # Start Web server. |
pascal@12906 | 52 /etc/init.d/lighttpd stop |
pascal@12906 | 53 /etc/init.d/lighttpd start |
pascal@12906 | 54 fi |
pascal@12906 | 55 fi |
pascal@12906 | 56 fi |
pascal@12906 | 57 # Configure apache server |
pascal@18730 | 58 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@18730 | 59 sed -i 's/lighttpd/apache/' "$1/etc/rcS.conf" |
pascal@18730 | 60 if [ ! -f "$1/etc/apache/conf.d/zerobin" ]; then |
pascal@18730 | 61 cat > "$1/etc/apache/conf.d/zerobin" <<EOT |
pascal@12906 | 62 <IfModule mod_alias.c> |
pascal@12906 | 63 Alias /paste /usr/share/zerobin/ |
pascal@12906 | 64 </IfModule> |
pascal@12906 | 65 <DirectoryMatch /usr/share/zerobin/> |
pascal@12906 | 66 php_value upload_max_filesize 2147483647 |
pascal@12906 | 67 DirectoryIndex index.php |
pascal@12906 | 68 AllowOverride None |
pascal@12906 | 69 Order allow,deny |
pascal@12906 | 70 Allow from all |
pascal@12906 | 71 </DirectoryMatch> |
pascal@12906 | 72 EOT |
pascal@12906 | 73 if [ -z "$1" ]; then |
pascal@12906 | 74 # Start Web server. |
pascal@12906 | 75 /etc/init.d/apache restart |
pascal@12906 | 76 fi |
pascal@12906 | 77 fi |
pascal@12906 | 78 fi |
pascal@12906 | 79 } |