wok rev 13478
Add grooms
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Oct 10 13:34:51 2012 +0200 (2012-10-10) |
parents | 44b93d6a30c8 |
children | 715718b84344 |
files | grooms/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/grooms/receipt Wed Oct 10 13:34:51 2012 +0200 1.3 @@ -0,0 +1,63 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="grooms" 1.7 +VERSION="1.0.1" 1.8 +CATEGORY="games" 1.9 +SHORT_DESC="Play the go game over internet." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://grooms.tuxfamily.org/" 1.12 +TARBALL="$PACKAGE-$VERSION.zip" 1.13 +WGET_URL="${WEB_SITE}$TARBALL" 1.14 + 1.15 +DEPENDS="php" 1.16 +BUILD_DEPENDS="" 1.17 + 1.18 +# Rules to configure and make the package. 1.19 +compile_rules() 1.20 +{ 1.21 + cd $src 1.22 +} 1.23 + 1.24 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.25 +genpkg_rules() 1.26 +{ 1.27 + mkdir -p $fs/var/lib 1.28 + cp -a $src $fs/var/lib/grooms 1.29 +} 1.30 + 1.31 +post_install() 1.32 +{ 1.33 + # Configure lighttpd server 1.34 + if [ -f $1/etc/lighttpd/lighttpd.conf ]; then 1.35 + if ! grep -q /var/lib/grooms $1/etc/lighttpd/lighttpd.conf; then 1.36 + sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/grooms/" => "/var/lib/grooms/",|g' -i $1/etc/lighttpd/lighttpd.conf 1.37 + if [ -z "$1" ]; then 1.38 + # Start Web server. 1.39 + /etc/init.d/lighttpd stop 1.40 + /etc/init.d/lighttpd start 1.41 + fi 1.42 + fi 1.43 + fi 1.44 + # Configure apache server 1.45 + if [ -f $1/etc/apache/httpd.conf ]; then 1.46 + if [ ! -f $1/etc/apache/conf.d/grooms ]; then 1.47 + cat > $1/etc/apache/conf.d/grooms <<EOT 1.48 +<IfModule mod_alias.c> 1.49 + Alias /grooms /var/lib/grooms 1.50 +</IfModule> 1.51 +<Directory /var/lib/grooms/> 1.52 + DirectoryIndex index.php 1.53 + Options +FollowSymLinks 1.54 + AllowOverride None 1.55 + Order allow,deny 1.56 + Allow from all 1.57 +</Directory> 1.58 +EOT 1.59 + if [ -z "$1" ]; then 1.60 + # Start Web server. 1.61 + /etc/init.d/apache stop 1.62 + /etc/init.d/apache start 1.63 + fi 1.64 + fi 1.65 + fi 1.66 +}