# SliTaz package receipt. PACKAGE="grooms" VERSION="1.0.9" CATEGORY="games" SHORT_DESC="Play the board game, Go, over the Internet." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="GPL2" WEB_SITE="http://$PACKAGE.tuxfamily.org" TARBALL="$PACKAGE-$VERSION.zip" WGET_URL="${WEB_SITE}/$TARBALL" DEPENDS="php" # What is the latest version available today? current_version() { wget -O - $WEB_SITE 2>/dev/null | \ sed "/latest/d;/$PACKAGE-[0-9]/!d;/zip/!d;s|.*$PACKAGE-\\(.*\\).zip.*|\\1|" | sort -Vr | sed q } # Rules to configure and make the package. compile_rules() { : } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/var/lib cp -a $src $fs/var/lib/grooms chown 80.80 $fs/var/lib/grooms } post_install() { # Configure lighttpd server if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then if ! grep -q /var/lib/grooms "$1/etc/lighttpd/lighttpd.conf"; then sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/grooms/" => "/var/lib/grooms/",|g' -i "$1/etc/lighttpd/lighttpd.conf" if [ -z "$1" ]; then # Start Web server. /etc/init.d/lighttpd stop /etc/init.d/lighttpd start fi fi fi # Configure apache server if [ -f "$1/etc/apache/httpd.conf" ]; then if [ ! -f "$1/etc/apache/conf.d/grooms" ]; then cat > "$1/etc/apache/conf.d/grooms" < Alias /grooms /var/lib/grooms DirectoryIndex index.php Options +FollowSymLinks AllowOverride None Order allow,deny Allow from all EOT if [ -z "$1" ]; then # Start Web server. /etc/init.d/apache stop /etc/init.d/apache start fi fi fi }