wok-current view zerobin/receipt @ rev 18171

Add nvidia-96xx (from undigest with fixes)
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Mon Jun 29 16:56:52 2015 +0300 (2015-06-29)
parents 7c9b40764925
children 9e01bc6321ea
line source
1 # SliTaz package receipt.
3 PACKAGE="zerobin"
4 VERSION="0.18_alpha"
5 CATEGORY="network"
6 SHORT_DESC="Online pastebin where the server has zero knowledge of pasted data."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="zlib/libpng"
9 TARBALL="${PACKAGE}_$VERSION.zip"
10 WEB_SITE="http://sebsauvage.net/wiki/doku.php?id=php:zerobin"
11 WGET_URL="http://sebsauvage.net/files/$TARBALL"
12 HOST_ARCH="any"
14 DEPENDS="php"
15 SUGGESTED="php-gd"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 patch -p0 < $stuff/zerobin.u
22 find css js lib tpl -type f | xargs dos2unix *.*
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 mkdir -p $fs/usr/share/zerobin
29 mkdir -p $fs/var/lib/zerobin/data $fs/var/lib/zerobin/tmp
30 cp -a $src/* $fs/usr/share/zerobin
31 cp $stuff/purge.sh $fs/var/lib/zerobin/data
32 ln -s /var/lib/zerobin/data $fs/usr/share/zerobin/data
33 ln -s /var/lib/zerobin/tmp $fs/usr/share/zerobin/tmp
34 chown -R www.www $fs/usr/share/zerobin $fs/var/lib/zerobin/*
35 }
37 # Post and pre install commands
38 post_install()
39 {
40 # Configure lighttpd server
41 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
42 if ! grep -q /usr/share/zerobin/ $1/etc/lighttpd/lighttpd.conf; then
43 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/paste/" => "/usr/share/zerobin/",|g' -i $1/etc/lighttpd/lighttpd.conf
44 if [ -z "$1" ]; then
45 # Start Web server.
46 /etc/init.d/lighttpd stop
47 /etc/init.d/lighttpd start
48 fi
49 fi
50 fi
51 # Configure apache server
52 if [ -f $1/etc/apache/httpd.conf ]; then
53 sed -i 's/lighttpd/apache/' $1/etc/rcS.conf
54 if [ ! -f $1/etc/apache/conf.d/zerobin ]; then
55 cat > $1/etc/apache/conf.d/zerobin <<EOT
56 <IfModule mod_alias.c>
57 Alias /paste /usr/share/zerobin/
58 </IfModule>
59 <DirectoryMatch /usr/share/zerobin/>
60 php_value upload_max_filesize 2147483647
61 DirectoryIndex index.php
62 AllowOverride None
63 Order allow,deny
64 Allow from all
65 </DirectoryMatch>
66 EOT
67 if [ -z "$1" ]; then
68 # Start Web server.
69 /etc/init.d/apache restart
70 fi
71 fi
72 fi
73 }