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