wok view grooms/receipt @ rev 24445
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 14 14:14:23 2022 +0000 (2022-02-14) |
parents | aaae1f868d34 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="grooms"
4 VERSION="1.0.9"
5 CATEGORY="games"
6 SHORT_DESC="Play the board game, Go, over the Internet."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://$PACKAGE.tuxfamily.org"
11 TARBALL="$PACKAGE-$VERSION.zip"
12 WGET_URL="${WEB_SITE}/$TARBALL"
14 DEPENDS="php"
16 # What is the latest version available today?
17 current_version()
18 {
19 wget -O - $WEB_SITE 2>/dev/null | \
20 sed "/latest/d;/$PACKAGE-[0-9]/!d;/zip/!d;s|.*$PACKAGE-\\(.*\\).zip.*|\\1|" | sort -Vr | sed q
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 :
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 mkdir -p $fs/var/lib
33 cp -a $src $fs/var/lib/grooms
34 chown 80.80 $fs/var/lib/grooms
35 }
37 post_install()
38 {
39 # Configure lighttpd server
40 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
41 if ! grep -q /var/lib/grooms "$1/etc/lighttpd/lighttpd.conf"; then
42 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/grooms/" => "/var/lib/grooms/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
43 if [ -z "$1" ]; then
44 # Start Web server.
45 /etc/init.d/lighttpd stop
46 /etc/init.d/lighttpd start
47 fi
48 fi
49 fi
50 # Configure apache server
51 if [ -f "$1/etc/apache/httpd.conf" ]; then
52 if [ ! -f "$1/etc/apache/conf.d/grooms" ]; then
53 cat > "$1/etc/apache/conf.d/grooms" <<EOT
54 <IfModule mod_alias.c>
55 Alias /grooms /var/lib/grooms
56 </IfModule>
57 <Directory /var/lib/grooms/>
58 DirectoryIndex index.php
59 Options +FollowSymLinks
60 AllowOverride None
61 Order allow,deny
62 Allow from all
63 </Directory>
64 EOT
65 if [ -z "$1" ]; then
66 # Start Web server.
67 /etc/init.d/apache stop
68 /etc/init.d/apache start
69 fi
70 fi
71 fi
72 }