wok view tazwikiss/receipt @ rev 8751
Removed all/most _pkg= lines in wok. The new tazwok-experimental can SOURCE paths and source are are all extracted to WOK/PACKAGE/PACKAGE-VERSION now with tazwok-experimental.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Feb 20 06:53:59 2011 +0000 (2011-02-20) |
parents | 19914b75dc51 |
children | bf6db9997f47 |
line source
1 # SliTaz package receipt.
3 PACKAGE="tazwikiss"
4 VERSION="0.3"
5 CATEGORY="office"
6 SHORT_DESC="Tiny SliTaz Wiki"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WEB_SITE="http://www.slitaz.org/"
9 CONFIG_FILES="/var/www/wiki/config*.sh"
11 # Rules to gen a SliTaz package suitable for Tazpkg.
12 genpkg_rules()
13 {
14 cp -a stuff/* $fs
15 chown -R 80.80 $fs/var/www
16 }
18 # Pre and post install commands for Tazpkg.
19 post_install()
20 {
21 server=busybox
22 # Configure lighttpd server
23 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
24 server=lighttpd
25 if ! grep -q '"/wiki/"' $1/etc/lighttpd/lighttpd.conf; then
26 sed -e 's|# Fast CGI|$HTTP["url"] =~ "/wiki/" {\
27 cgi.assign = (\
28 ".sh" => "/bin/sh"\
29 )\
30 index-file.names = ( "index.sh" )\
31 }\n\n&|' -i $1/etc/lighttpd/lighttpd.conf
32 if [ -z "$1" ]; then
33 # Start Web server.
34 /etc/init.d/lighttpd stop
35 /etc/init.d/lighttpd start
36 fi
37 fi
38 fi
39 # Configure apache server
40 if [ -f $1/etc/apache/httpd.conf ]; then
41 server=apache
42 if [ ! -f $1/etc/apache/conf.d/tazwikiss ]; then
43 cat > $1/etc/apache/conf.d/tazwikiss <<EOT
44 <DirectoryMatch /var/www/wiki/>
45 Options +ExecCGI
46 AddHandler cgi-script .sh
47 DirectoryIndex index.sh
48 AllowOverride None
49 Order allow,deny
50 Allow from all
51 </DirectoryMatch>
52 EOT
53 if [ -z "$1" ]; then
54 # Start Web server.
55 /etc/init.d/apache stop
56 /etc/init.d/apache start
57 fi
58 fi
59 fi
60 # Configure busybox/httpd server by default
61 if [ "$server" == "busybox" ]; then
62 sed -i 's/lighttpd/httpd/' $1/etc/rcS.conf
63 if [ ! -s $1/etc/httpd.conf ]; then
64 cat > $1/etc/httpd.conf <<EOT
65 H:/var/www
66 A:0.0.0.0/0
67 EOT
68 fi
69 while read line; do
70 grep -q "$line" $1/etc/httpd.conf && continue
71 echo "$line" >> $1/etc/httpd.conf
72 done <<EOT
73 *.sh:/bin/sh
74 EOT
75 grep -q ' httpd ' $1/etc/rcS.conf ||
76 sed -i 's/ slim"/ httpd slim"/' $1/etc/rcS.conf
77 if [ -z "$1" ]; then
78 # Start Web server.
79 /etc/init.d/httpd stop
80 /etc/init.d/httpd start
81 fi
82 fi
83 while read line; do
84 [ -x $1/$line ] && continue
85 echo "WARNING: $line not found, $PACKAGE will not work !"
86 done <<EOT
87 /usr/sbin/httpd
88 /usr/bin/httpd_helper.sh
89 EOT
90 echo "The default password to edit pages is 'test'"
91 }