From 79642cde01de7ce53ac4a41b9596cdc14aa790c9 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 29 Jan 2019 17:31:35 -0500 Subject: [PATCH] Add mercurial (shadowing aports until 3.10) --- sr.ht/mercurial/APKBUILD | 66 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 sr.ht/mercurial/APKBUILD diff --git a/sr.ht/mercurial/APKBUILD b/sr.ht/mercurial/APKBUILD new file mode 100644 index 0000000..6d509ba --- /dev/null +++ b/sr.ht/mercurial/APKBUILD @@ -0,0 +1,66 @@ +# Contributor: Sören Tempel +# Maintainer: Natanael Copa +pkgname=mercurial +pkgver=4.8.2 +pkgrel=1 +pkgdesc="Scalable distributed SCM tool" +url="https://www.mercurial-scm.org" +arch="all" +license="GPL-2.0-or-later" +depends="" +makedepends="python2-dev" +subpackages=" + $pkgname-doc + $pkgname-vim:vim:noarch + $pkgname-zsh-completion:zshcomp:noarch + $pkgname-bash-completion:bashcomp:noarch" +source="https://www.mercurial-scm.org/release/$pkgname-$pkgver.tar.gz" +builddir="$srcdir"/$pkgname-$pkgver + +build() { + cd "$builddir" + python2 setup.py build +} + +package() { + cd "$builddir" + python2 setup.py install --root="$pkgdir" + install -m755 contrib/hgk contrib/hg-ssh hgeditor "$pkgdir"/usr/bin + + local man + for man in doc/*.?; do + install -Dm644 "$man" \ + "$pkgdir"/usr/share/man/man${man##*.}/${man##*/} + done +} + +vim() { + depends="" + pkgdesc="Vim syntax for $pkgname" + install_if="vim $pkgname=$pkgver-r$pkgrel" + + cd "$builddir"/contrib/vim/ + mkdir -p "$subpkgdir"/usr/share/vim/vimfiles/syntax/ + install -Dm644 HGAnnotate.vim hgtest.vim \ + "$subpkgdir"/usr/share/vim/vimfiles/syntax/ +} + +zshcomp() { + depends="" + pkgdesc="Zsh completion for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel zsh" + + install -Dm644 "$builddir"/contrib/zsh_completion \ + "$subpkgdir"/usr/share/zsh/site-functions/_${pkgname} +} + +bashcomp() { + depends="" + pkgdesc="Bash completion for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel bash-completion" + + install -Dm644 "$builddir"/contrib/bash_completion \ + "$subpkgdir"/usr/share/bash-completion/completions/${pkgname} +} + +sha512sums="1010f20ea5ed081f2d5c58e97696027b2d06dd0471b39e88a1858d5409bcf59f2ccf360925c417495834fccba06e1525ae70894233164d617227814ca2277e20 mercurial-4.8.2.tar.gz" -- 2.45.2