wok view mercurial/receipt @ rev 25037

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