wok view tazwikiss/receipt @ rev 9545

Reverse wxpython.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Apr 09 07:25:03 2011 +0000 (2011-04-09)
parents 9272b69b5779
children 5b2d6ec39fb5
line source
1 # SliTaz package receipt.
3 PACKAGE="tazwikiss"
4 VERSION="1.0.5"
5 CATEGORY="office"
6 SHORT_DESC="Tiny SliTaz Wiki"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 BUILD_DEPENDS="mercurial"
9 SOURCE="slitaz-dev-tools"
10 WGET_URL="mercurial|http://hg.slitaz.org/slitaz-dev-tools"
11 BRANCH="$VERSION"
12 WEB_SITE="http://www.slitaz.org/"
13 CONFIG_FILES="/var/www/wiki/config*.sh"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 cp -a $src/$PACKAGE/rootfs/* $fs
19 chown -R 80.80 $fs/var/www
20 }
22 # Pre and post install commands for Tazpkg.
23 post_install()
24 {
25 server=busybox
26 # Configure lighttpd server
27 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
28 server=lighttpd
29 if ! grep -q '"/wiki/"' $1/etc/lighttpd/lighttpd.conf; then
30 sed -e 's|# Fast CGI|$HTTP["url"] =~ "/wiki/" {\
31 cgi.assign = (\
32 ".sh" => "/bin/sh"\
33 )\
34 index-file.names = ( "index.sh" )\
35 }\n\n&|' -i $1/etc/lighttpd/lighttpd.conf
36 if [ -z "$1" ]; then
37 # Start Web server.
38 /etc/init.d/lighttpd stop
39 /etc/init.d/lighttpd start
40 fi
41 fi
42 fi
43 # Configure apache server
44 if [ -f $1/etc/apache/httpd.conf ]; then
45 server=apache
46 if [ ! -f $1/etc/apache/conf.d/tazwikiss ]; then
47 cat > $1/etc/apache/conf.d/tazwikiss <<EOT
48 <DirectoryMatch /var/www/wiki/>
49 Options +ExecCGI
50 AddHandler cgi-script .sh
51 DirectoryIndex index.sh
52 AllowOverride None
53 Order allow,deny
54 Allow from all
55 </DirectoryMatch>
56 EOT
57 if [ -z "$1" ]; then
58 # Start Web server.
59 /etc/init.d/apache stop
60 /etc/init.d/apache start
61 fi
62 fi
63 fi
64 # Configure busybox/httpd server by default
65 if [ "$server" == "busybox" ]; then
66 sed -i 's/lighttpd/httpd/' $1/etc/rcS.conf
67 if [ ! -s $1/etc/httpd.conf ]; then
68 cat > $1/etc/httpd.conf <<EOT
69 H:/var/www
70 A:0.0.0.0/0
71 .xml:text/xml
72 .tgz:application/x-tgz
73 .tar.gz:application/x-tgz
74 .tazpkg:application/x-tazpkg
75 EOT
76 fi
77 while read line; do
78 grep -q "$line" $1/etc/httpd.conf && continue
79 echo "$line" >> $1/etc/httpd.conf
80 done <<EOT
81 *.sh:/bin/sh
82 EOT
83 grep -q ' httpd ' $1/etc/rcS.conf ||
84 sed -i 's/ slim"/ httpd slim"/' $1/etc/rcS.conf
85 if [ -z "$1" ]; then
86 # Start Web server.
87 /etc/init.d/httpd stop
88 /etc/init.d/httpd start
89 fi
90 fi
91 while read line; do
92 [ -x $1/$line ] && continue
93 echo "WARNING: $line not found, $PACKAGE will not work !"
94 done <<EOT
95 /usr/sbin/httpd
96 /usr/bin/httpd_helper.sh
97 EOT
98 echo "The default password to edit pages is 'test'"
99 }