wok-6.x annotate grooms/receipt @ rev 13607
spacefm: add and improve custom config files and add desktop file fot destop pref
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Nov 10 20:00:42 2012 +0100 (2012-11-10) |
parents | 5fb313d44a9b |
children | ce9c00ae0e36 |
rev | line source |
---|---|
pascal@13478 | 1 # SliTaz package receipt. |
pascal@13478 | 2 |
pascal@13478 | 3 PACKAGE="grooms" |
pascal@13478 | 4 VERSION="1.0.1" |
pascal@13478 | 5 CATEGORY="games" |
pascal@13478 | 6 SHORT_DESC="Play the go game over internet." |
pascal@13478 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@13478 | 8 WEB_SITE="http://grooms.tuxfamily.org/" |
pascal@13478 | 9 TARBALL="$PACKAGE-$VERSION.zip" |
pascal@13478 | 10 WGET_URL="${WEB_SITE}$TARBALL" |
pascal@13478 | 11 |
pascal@13478 | 12 DEPENDS="php" |
pascal@13478 | 13 BUILD_DEPENDS="" |
pascal@13478 | 14 |
pascal@13478 | 15 # Rules to configure and make the package. |
pascal@13478 | 16 compile_rules() |
pascal@13478 | 17 { |
pascal@13478 | 18 cd $src |
pascal@13478 | 19 } |
pascal@13478 | 20 |
pascal@13478 | 21 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@13478 | 22 genpkg_rules() |
pascal@13478 | 23 { |
pascal@13478 | 24 mkdir -p $fs/var/lib |
pascal@13478 | 25 cp -a $src $fs/var/lib/grooms |
pascal@13479 | 26 chown 80.80 $fs/var/lib/grooms |
pascal@13478 | 27 } |
pascal@13478 | 28 |
pascal@13478 | 29 post_install() |
pascal@13478 | 30 { |
pascal@13478 | 31 # Configure lighttpd server |
pascal@13478 | 32 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@13478 | 33 if ! grep -q /var/lib/grooms $1/etc/lighttpd/lighttpd.conf; then |
pascal@13478 | 34 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/grooms/" => "/var/lib/grooms/",|g' -i $1/etc/lighttpd/lighttpd.conf |
pascal@13478 | 35 if [ -z "$1" ]; then |
pascal@13478 | 36 # Start Web server. |
pascal@13478 | 37 /etc/init.d/lighttpd stop |
pascal@13478 | 38 /etc/init.d/lighttpd start |
pascal@13478 | 39 fi |
pascal@13478 | 40 fi |
pascal@13478 | 41 fi |
pascal@13478 | 42 # Configure apache server |
pascal@13478 | 43 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@13478 | 44 if [ ! -f $1/etc/apache/conf.d/grooms ]; then |
pascal@13478 | 45 cat > $1/etc/apache/conf.d/grooms <<EOT |
pascal@13478 | 46 <IfModule mod_alias.c> |
pascal@13478 | 47 Alias /grooms /var/lib/grooms |
pascal@13478 | 48 </IfModule> |
pascal@13478 | 49 <Directory /var/lib/grooms/> |
pascal@13478 | 50 DirectoryIndex index.php |
pascal@13478 | 51 Options +FollowSymLinks |
pascal@13478 | 52 AllowOverride None |
pascal@13478 | 53 Order allow,deny |
pascal@13478 | 54 Allow from all |
pascal@13478 | 55 </Directory> |
pascal@13478 | 56 EOT |
pascal@13478 | 57 if [ -z "$1" ]; then |
pascal@13478 | 58 # Start Web server. |
pascal@13478 | 59 /etc/init.d/apache stop |
pascal@13478 | 60 /etc/init.d/apache start |
pascal@13478 | 61 fi |
pascal@13478 | 62 fi |
pascal@13478 | 63 fi |
pascal@13478 | 64 } |