wok annotate mercurial/receipt @ rev 24425

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Feb 11 17:50:36 2022 +0000 (2022-02-11)
parents 670e65815150
children 5d4991abf806
rev   line source
pankso@29 1 # SliTaz package receipt.
pankso@29 2
pankso@29 3 PACKAGE="mercurial"
Hans-G?nter@23173 4 VERSION="5.3.1"
pankso@204 5 CATEGORY="development"
pankso@29 6 SHORT_DESC="Revision tools system."
pankso@29 7 MAINTAINER="pankso@slitaz.org"
pascal@15000 8 LICENSE="GPL2"
Hans-G?nter@21431 9 WEB_SITE="https://www.mercurial-scm.org/"
Hans-G?nter@21431 10
pankso@29 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
Hans-G?nter@21431 12 WGET_URL="${WEB_SITE}release/$TARBALL"
Hans-G?nter@21431 13
Hans-G?nter@21431 14 PROVIDE="hg"
Hans-G?nter@21431 15 DEPENDS="libssl patch python"
Hans-G?nter@21431 16 BUILD_DEPENDS="openssl-dev patch python-dev"
pascal@24004 17 SUGGESTED="cacerts"
Hans-G?nter@23173 18
pankso@5646 19 CONFIG_FILES="/etc/mercurial/hgweb.config"
Hans-G?nter@21431 20
pankso@16492 21 HOST_ARCH="i486 arm"
pankso@29 22
pascal@24425 23 # What is the latest version available today?
pascal@24425 24 current_version()
pascal@24425 25 {
pascal@24425 26 wget -O - ${WGET_URL%/*} 2>/dev/null | \
pascal@24425 27 sed "/snapshot/d;/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
pascal@24425 28 }
pascal@24425 29
pankso@29 30 # Rules to configure and make the package.
pankso@29 31 compile_rules()
pankso@29 32 {
Hans-G?nter@21431 33 # Cross compilation hack to avoid using compiler which build python
pankso@16506 34 # itself.
pankso@16491 35 case "$ARCH" in
pankso@16491 36 arm*)
pankso@16491 37 mv /usr/bin/i486-slitaz-linux-gcc /tmp &&
pankso@16575 38 ln -s /cross/${ARCH}/tools/bin/${HOST_SYSTEM}-gcc \
pankso@16491 39 /usr/bin/i486-slitaz-linux-gcc ;;
pankso@16491 40 esac &&
Hans-G?nter@21431 41
Hans-G?nter@21431 42 python setup.py install \
Hans-G?nter@21431 43 --root="$DESTDIR" \
Hans-G?nter@21431 44 --optimize=1 &&
pankso@16491 45 mkdir -p $DESTDIR/usr/share/examples/mercurial &&
pankso@16491 46 cp -a $src/hgweb.cgi $DESTDIR/usr/share/examples/mercurial &&
Hans-G?nter@21431 47
pankso@16491 48 case "$ARCH" in
pankso@16491 49 arm*)
pankso@16491 50 rm /usr/bin/i486-slitaz-linux-gcc &&
pankso@16491 51 mv /tmp/i486-slitaz-linux-gcc /usr/bin ;;
pankso@16491 52 esac
pankso@29 53 }
pankso@29 54
pankso@29 55 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@29 56 genpkg_rules()
pankso@29 57 {
pankso@29 58 mkdir -p $fs/usr/share/examples/mercurial
Hans-G?nter@21431 59
slaxemulator@12998 60 cp -a $install/usr/bin $fs/usr
slaxemulator@12998 61 cp -a $install/usr/lib $fs/usr
pankso@4464 62
pankso@29 63 # Examples
Hans-G?nter@21431 64 cp -a $stuff/hgwebdir.cgi \
Hans-G?nter@21431 65 $fs/usr/share/examples/mercurial
Hans-G?nter@21431 66 cp -a $stuff/lighttpd-hg-vhost.conf \
Hans-G?nter@21431 67 $fs/usr/share/examples/mercurial
pankso@4464 68
Hans-G?nter@23173 69 # Configuration file for hgweb
pankso@29 70 mkdir -p $fs/etc/mercurial
slaxemulator@9446 71 cp -a $stuff/hgweb.config $fs/etc/mercurial
slaxemulator@7117 72
pankso@29 73 chown -R root.root $fs
pankso@29 74 }