SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "phpeasyvcs"

# SliTaz package receipt.

PACKAGE="phpeasyvcs"
SOURCE="phpEasyVCS"
VERSION="2.0"
CATEGORY="network"
SHORT_DESC="A simple version control system (VCS) and WebDAV server."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL3"
WEB_SITE="https://phpeasyvcs.sourceforge.net/"

TARBALL="$SOURCE-$VERSION.zip"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

DEPENDS="php"

# What is the latest version available today?
current_version()
{
    wget -O - https://sourceforge.net/projects/phpeasyvcs/files/ 2>/dev/null | \
    sed '/Click to/!d;/phpEasyVCS/!d;s|.*phpEasyVCS-||;s|.zip.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
    :
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/share
    cp -a $src    $fs/usr/share/phpeasyvcs
}

post_install()
{
    # Configure lighttpd server
    if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
      then
        if ! grep -q /usr/share/phpeasyvcs/ "$1/etc/lighttpd/lighttpd.conf"
          then
                sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/phpeasyvcs/" => "/usr/share/phpeasyvcs/",|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/phpeasyvcs" ]
          then
            cat > "$1/etc/apache/conf.d/phpeasyvcs" <<EOT
<IfModule mod_alias.c>
    Alias /phpeasyvcs /usr/share/phpeasyvcs
</IfModule>
<Directory /usr/share/phpeasyvcs/>
    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)