wok view tazwikiss/receipt @ rev 18617

make-slitaz-icons: add media-player buttons that must use stock icons, but not used them
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Nov 19 14:33:00 2015 +0200 (2015-11-19)
parents 5e26ab6bd360
children f9743cf20afc
line source
1 # SliTaz package receipt.
3 PACKAGE="tazwikiss"
4 VERSION="250"
5 CATEGORY="office"
6 SHORT_DESC="Tiny SliTaz Wiki"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 SOURCE="slitaz-dev-tools"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WGET_URL="http://hg.slitaz.org/slitaz-dev-tools/archive/$VERSION.tar.bz2"
12 WEB_SITE="http://www.slitaz.org/"
13 CONFIG_FILES="/var/www/wiki/config.sh /var/www/wiki/config-de.sh \
14 /var/www/wiki/config-fr.sh"
15 HOST_ARCH="any"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 mkdir -p $DESTDIR 2> /dev/null
21 cp -a $src/$PACKAGE/rootfs/* $DESTDIR
22 }
24 # Rules to gen a SliTaz package suitable for Tazpkg.
25 genpkg_rules()
26 {
27 cp -a $install/* $fs
28 chown -R 80.80 $fs/var/www
29 }
31 # Pre and post install commands for Tazpkg.
32 post_install()
33 {
34 server=busybox
35 # Configure lighttpd server
36 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
37 server=lighttpd
38 if ! grep -q '"/wiki/"' $1/etc/lighttpd/lighttpd.conf; then
39 sed -e 's|# Fast CGI|$HTTP["url"] =~ "/wiki/" {\
40 cgi.assign = (\
41 ".sh" => "/bin/sh"\
42 )\
43 index-file.names = ( "index.sh" )\
44 }\n\n&|' -i $1/etc/lighttpd/lighttpd.conf
45 if [ -z "$1" ]; then
46 # Start Web server.
47 /etc/init.d/lighttpd stop
48 /etc/init.d/lighttpd start
49 fi
50 fi
51 fi
52 # Configure apache server
53 if [ -f $1/etc/apache/httpd.conf ]; then
54 server=apache
55 if [ ! -f $1/etc/apache/conf.d/tazwikiss ]; then
56 cat > $1/etc/apache/conf.d/tazwikiss <<EOT
57 <DirectoryMatch /var/www/wiki/>
58 Options +ExecCGI
59 AddHandler cgi-script .sh
60 DirectoryIndex index.sh
61 AllowOverride None
62 Order allow,deny
63 Allow from all
64 </DirectoryMatch>
65 EOT
66 if [ -z "$1" ]; then
67 # Start Web server.
68 /etc/init.d/apache stop
69 /etc/init.d/apache start
70 fi
71 fi
72 fi
73 # Configure busybox/httpd server by default
74 if [ "$server" == "busybox" ]; then
75 sed -i 's/lighttpd/httpd/' $1/etc/rcS.conf
76 if [ ! -s $1/etc/httpd.conf ]; then
77 cat > $1/etc/httpd.conf <<EOT
78 H:/var/www
79 A:0.0.0.0/0
80 .xml:text/xml
81 .tgz:application/x-tgz
82 .tar.gz:application/x-tgz
83 .tazpkg:application/x-tazpkg
84 EOT
85 fi
86 while read line; do
87 grep -q "$line" $1/etc/httpd.conf && continue
88 echo "$line" >> $1/etc/httpd.conf
89 done <<EOT
90 *.sh:/bin/sh
91 EOT
92 grep -q ' httpd ' $1/etc/rcS.conf ||
93 sed -i 's/ slim"/ httpd slim"/' $1/etc/rcS.conf
94 if [ -z "$1" ]; then
95 # Start Web server.
96 /etc/init.d/httpd stop
97 /etc/init.d/httpd start
98 fi
99 fi
100 while read line; do
101 [ -x $1/$line ] && continue
102 echo "WARNING: $line not found, $PACKAGE will not work !"
103 done <<EOT
104 /usr/sbin/httpd
105 /usr/lib/slitaz/httphelper.sh
106 EOT
107 echo "The default password to edit pages is 'test'"
108 }