aboutsummaryrefslogblamecommitdiffstats
path: root/main/mercurial/APKBUILD
blob: 186174ba6811d99fa26302814efb52e4cef74384 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                              

                                                   

            
                                         
                                    
          

               
                         





                                                                      
 
                                    
         

                                         


            
                       
                                                            

















                                                                                    
 




















                                                                                         


                                                                                                                                                                     
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mercurial
pkgver=3.9.1
pkgrel=0
pkgdesc="A scalable distributed SCM tool"
url="https://www.mercurial-scm.org/"
arch="all"
license="GPL2+"
depends=""
makedepends="python2-dev"
subpackages="
	$pkgname-doc
	$pkgname-vim:vim
	$pkgname-zsh-completion:zshcomp
	$pkgname-bash-completion:bashcomp"
source="https://www.mercurial-scm.org/release/$pkgname-$pkgver.tar.gz"

_builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$_builddir"
	python setup.py build || return 1
}

package() { 
	cd "$_builddir"
	python setup.py install --root="$pkgdir" || return 1
	install -m755 contrib/hgk hgeditor "$pkgdir"/usr/bin || return 1

	for man in doc/*.?; do
		install -Dm644 "$man" \
			"$pkgdir"/usr/share/man/man${man##*.}/${man##*/} || return 1
	done
}

vim() {
	depends=""
	pkgdesc="Vim syntax for $pkgname"
	install_if="vim $pkgname=$pkgver-r$pkgrel"
	arch="noarch"

	cd "$_builddir"/contrib/vim/
	mkdir -p "$subpkgdir"/usr/share/vim/vimfiles/syntax/
	install -Dm644 HGAnnotate.vim hgtest.vim \
		"$subpkgdir"/usr/share/vim/vimfiles/syntax/ || return 1
}

zshcomp() {
	depends=""
	pkgdesc="Zsh completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel zsh"
	arch="noarch"

	install -Dm644 "$_builddir"/contrib/zsh_completion \
		"$subpkgdir"/usr/share/zsh/site-functions/_${pkgname} || return 1
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
	arch="noarch"

	install -Dm644 "$_builddir"/contrib/bash_completion \
		"$subpkgdir"/usr/share/bash-completion/completions/${pkgname} || return 1
}

md5sums="3759dd10edb8c1a6dfb8ff0ce82658ce  mercurial-3.9.1.tar.gz"
sha256sums="625e4fc7e85ec2278c2828bdc547fce74091b3bbe4d9eeeba2d61af51195df74  mercurial-3.9.1.tar.gz"
sha512sums="d96e45cafd36be692d6ce5259e18140641c24f73d4731ff767df0f39af425b0630c687436fc0f53d5882495ceacacaadd5e19f8f7c701b4b94c48631123b4666  mercurial-3.9.1.tar.gz"