wok view grooms/receipt @ rev 13478

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