comparison dev/mercurial/mercurial.sh @ 170:37500425af39

dev/mercurial: initial import, closes #1086
author David Demelier <markand@malikania.fr>
date Fri, 15 Mar 2019 20:15:00 +0100
parents
children 5f236cd77524
comparison
equal deleted inserted replaced
169:6f216e39b28e 170:37500425af39
1 #!/bin/sh
2 #
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
4 #
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 #
17
18 PKGNAME=mercurial
19 PKGVERSION=4.9
20 PKGREVISION=1
21 PKGLICENSE="GPLv2+"
22 PKGSUMMARY="scalable distributed SCM tool"
23 PKGDOWNLOAD="https://www.mercurial-scm.org/release/$PKGNAME-$PKGVERSION.tar.gz"
24 PKGDEPENDS="python/python2 python/py-setuptools python/py-docutils"
25
26 : ${CC:=gcc}
27 : ${CFLAGS:=-O2}
28
29 build()
30 {
31 rm -rf $PKGNAME-$PKGVERSION
32 tar xvaf $PKGNAME-$PKGVERSION.tar.gz
33 pushd $PKGNAME-$PKGVERSION
34
35 CC="$CC" \
36 CFLAGS="$CFLAGS" \
37 make PREFIX=/usr all
38 make install PREFIX=/usr DESTDIR=$DESTDIR
39 install -Dm0755 contrib/hg-ssh $DESTDIR/usr/bin/hg-ssh
40 install -Dm0755 contrib/hgk $DESTDIR/usr/libexec/mercurial/hgk
41 install -Dm0644 contrib/zsh_completion $DESTDIR/usr/share/zsh/site-functions/_$PKGNAME
42 install -Dm0644 contrib/bash_completion $DESTDIR/usr/share/bash-completion/completions/$PKGNAME
43
44 popd
45 rm -rf $PKGNAME-$PKGVERSION
46 }