SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "mercurial"

# SliTaz package receipt.

PACKAGE="mercurial"
VERSION="6.1.1"
CATEGORY="development"
SHORT_DESC="Revision tools system."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://www.mercurial-scm.org/"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="${WEB_SITE}release/$TARBALL"

PROVIDE="hg"
SUGGESTED="cacerts"
DEPENDS="libssl patch python"
BUILD_DEPENDS="openssl-dev patch python-dev"

CONFIG_FILES="/etc/mercurial/hgweb.config"

HOST_ARCH="i486 arm"

# What is the latest version available today?
current_version()
{
    wget -O - ${WGET_URL%/*} 2>/dev/null | \
    sed "/snapshot/d;/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    # Cross compilation hack to avoid using compiler which build python 
    # itself.
    case "$ARCH" in
        arm*)
            mv /usr/bin/i486-slitaz-linux-gcc /tmp &&
            ln -s /cross/${ARCH}/tools/bin/${HOST_SYSTEM}-gcc \
                /usr/bin/i486-slitaz-linux-gcc ;;
    esac &&

    python setup.py install        \
        --root="$DESTDIR"    \
        --optimize=1 &&
    mkdir -p $DESTDIR/usr/share/examples/mercurial &&
    cp -a $src/hgweb.cgi $DESTDIR/usr/share/examples/mercurial &&

    case "$ARCH" in
        arm*) 
            rm /usr/bin/i486-slitaz-linux-gcc &&
            mv /tmp/i486-slitaz-linux-gcc /usr/bin ;;
    esac
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/share/examples/mercurial

    cp -a $install/usr/bin        $fs/usr
    cp -a $install/usr/lib        $fs/usr

    # Examples
    cp -a $stuff/hgwebdir.cgi    $fs/usr/share/examples/mercurial
    cp -a $stuff/lighttpd-hg-vhost.conf \
                    $fs/usr/share/examples/mercurial

    # Configuration file for hgweb
    mkdir -p $fs/etc/mercurial
    cp -a $stuff/hgweb.config    $fs/etc/mercurial
    
    chown -R root.root        $fs
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)