wok-6.x view tazwikiss/receipt @ rev 6206

thunderbird: switch to built-in sqlite
author Dominique Corbex <domcox@slitaz.org>
date Sat Sep 11 11:05:34 2010 +0200 (2010-09-11)
parents
children 19914b75dc51
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 I:index.sh
74 *.sh:/bin/sh
75 EOT
76 if [ -z "$1" ]; then
77 # Start Web server.
78 /etc/init.d/httpd stop
79 /etc/init.d/httpd start
80 fi
81 fi
82 while read line; do
83 [ -x $1/$line ] && continue
84 echo "WARNING: $line not found, $PACKAGE will not work !"
85 done <<EOT
86 /usr/sbin/httpd
87 /usr/bin/httpd_helper.sh
88 EOT
89 echo "The default password to edit pages is 'test'"
90 }