wok-next annotate tazwikiss/receipt @ rev 20916
libopenraw, abiword: update deps; boost: pack unpacked libs
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Aug 21 05:42:25 2018 +0300 (2018-08-21) |
parents | c4e53a39395a |
children | d5aab818505e |
rev | line source |
---|---|
pascal@5859 | 1 # SliTaz package receipt. |
pascal@5859 | 2 |
pascal@5859 | 3 PACKAGE="tazwikiss" |
al@19866 | 4 VERSION="306" |
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" |
pascal@5859 | 9 WEB_SITE="http://www.slitaz.org/" |
al@20888 | 10 REPOLOGY="-" |
al@20888 | 11 |
al@18599 | 12 CONFIG_FILES="/var/www/wiki/config.sh /var/www/wiki/config-de.sh \ |
al@18599 | 13 /var/www/wiki/config-fr.sh" |
pascal@5859 | 14 |
al@19588 | 15 TARBALL="slitaz-dev-tools-$VERSION.tar.bz2" |
al@19588 | 16 WGET_URL="http://hg.slitaz.org/slitaz-dev-tools/archive/$VERSION.tar.bz2" |
al@19588 | 17 |
al@19588 | 18 DEPENDS="busybox slitaz-base-files" |
al@19588 | 19 SIBLINGS="mirror-tools qemu-box slitaz-dev-tools slitaz-mercurial-style \ |
al@19588 | 20 tazchroot tazdev yaff" |
al@19588 | 21 |
pascal@10471 | 22 # Rules to configure and make the package. |
pascal@10471 | 23 compile_rules() |
pascal@10471 | 24 { |
al@18964 | 25 mkdir -p $DESTDIR 2>/dev/null |
pascal@10471 | 26 cp -a $src/$PACKAGE/rootfs/* $DESTDIR |
pascal@10471 | 27 } |
pascal@10471 | 28 |
pascal@5859 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@5859 | 30 genpkg_rules() |
pascal@5859 | 31 { |
pascal@15603 | 32 cp -a $install/* $fs |
pascal@5859 | 33 chown -R 80.80 $fs/var/www |
pascal@5859 | 34 } |
pascal@5859 | 35 |
pascal@5859 | 36 # Pre and post install commands for Tazpkg. |
pascal@5859 | 37 post_install() |
pascal@5859 | 38 { |
pascal@5859 | 39 server=busybox |
pascal@5859 | 40 # Configure lighttpd server |
pascal@18730 | 41 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@5859 | 42 server=lighttpd |
pascal@18730 | 43 if ! grep -q '"/wiki/"' "$1/etc/lighttpd/lighttpd.conf"; then |
pascal@5859 | 44 sed -e 's|# Fast CGI|$HTTP["url"] =~ "/wiki/" {\ |
pascal@5859 | 45 cgi.assign = (\ |
pascal@5859 | 46 ".sh" => "/bin/sh"\ |
pascal@5859 | 47 )\ |
pascal@5859 | 48 index-file.names = ( "index.sh" )\ |
al@19850 | 49 }\n\n&|' -i "$1/etc/lighttpd/lighttpd.conf" |
pascal@5859 | 50 if [ -z "$1" ]; then |
pascal@5859 | 51 # Start Web server. |
pascal@5859 | 52 /etc/init.d/lighttpd stop |
pascal@5859 | 53 /etc/init.d/lighttpd start |
pascal@5859 | 54 fi |
pascal@5859 | 55 fi |
pascal@5859 | 56 fi |
pascal@5859 | 57 # Configure apache server |
pascal@18730 | 58 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@5859 | 59 server=apache |
pascal@18730 | 60 if [ ! -f "$1/etc/apache/conf.d/tazwikiss" ]; then |
pascal@18730 | 61 cat > "$1/etc/apache/conf.d/tazwikiss" <<EOT |
pascal@5859 | 62 <DirectoryMatch /var/www/wiki/> |
pascal@5859 | 63 Options +ExecCGI |
pascal@5859 | 64 AddHandler cgi-script .sh |
pascal@5859 | 65 DirectoryIndex index.sh |
pascal@5859 | 66 AllowOverride None |
pascal@5859 | 67 Order allow,deny |
pascal@5859 | 68 Allow from all |
pascal@5859 | 69 </DirectoryMatch> |
pascal@5859 | 70 EOT |
pascal@5859 | 71 if [ -z "$1" ]; then |
al@18640 | 72 echo |
pascal@5859 | 73 # Start Web server. |
pascal@5859 | 74 /etc/init.d/apache stop |
pascal@5859 | 75 /etc/init.d/apache start |
pascal@5859 | 76 fi |
pascal@5859 | 77 fi |
pascal@5859 | 78 fi |
pascal@5859 | 79 # Configure busybox/httpd server by default |
pascal@5859 | 80 if [ "$server" == "busybox" ]; then |
pascal@18730 | 81 sed -i 's/lighttpd/httpd/' "$1/etc/rcS.conf" |
pascal@18730 | 82 if [ ! -s "$1/etc/httpd.conf" ]; then |
pascal@18730 | 83 cat > "$1/etc/httpd.conf" <<EOT |
pascal@5859 | 84 H:/var/www |
pascal@5859 | 85 A:0.0.0.0/0 |
pascal@9514 | 86 .xml:text/xml |
pascal@9514 | 87 .tgz:application/x-tgz |
pascal@9514 | 88 .tar.gz:application/x-tgz |
pascal@9514 | 89 .tazpkg:application/x-tazpkg |
pascal@5859 | 90 EOT |
pascal@5859 | 91 fi |
pascal@5859 | 92 while read line; do |
pascal@18730 | 93 grep -q "$line" "$1/etc/httpd.conf" && continue |
pascal@18730 | 94 echo "$line" >> "$1/etc/httpd.conf" |
pascal@5859 | 95 done <<EOT |
pascal@5859 | 96 *.sh:/bin/sh |
pascal@5859 | 97 EOT |
pascal@18730 | 98 grep -q ' httpd ' "$1/etc/rcS.conf" || |
pascal@18730 | 99 sed -i 's/ slim"/ httpd slim"/' "$1/etc/rcS.conf" |
pascal@5859 | 100 if [ -z "$1" ]; then |
al@18964 | 101 echo |
pascal@5859 | 102 # Start Web server. |
pascal@5859 | 103 /etc/init.d/httpd stop |
pascal@5859 | 104 /etc/init.d/httpd start |
pascal@5859 | 105 fi |
pascal@5859 | 106 fi |
al@19588 | 107 |
al@19858 | 108 [ -n "$quiet" ] && return |
al@19858 | 109 echo -e "The default password to edit pages is 'test'\n" |
pascal@5859 | 110 } |