SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "grooms"

# 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" <<EOT
<IfModule mod_alias.c>
    Alias /grooms /var/lib/grooms
</IfModule>
<Directory /var/lib/grooms/>
    DirectoryIndex index.php
    Options +FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
EOT
            if [ -z "$1" ]; then
                # Start Web server.
                /etc/init.d/apache stop
                /etc/init.d/apache start
            fi
        fi
    fi
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)