core/mercurial/PKGBUILD

46 lines
1.6 KiB
Bash
Raw Normal View History

2012-07-08 01:49:33 +08:00
#
# Chakra Packages for Chakra, part of chakra-project.org
#
pkgname=mercurial
2013-05-12 07:10:13 +08:00
pkgver=2.6
2012-03-12 00:42:41 +08:00
pkgrel=1
pkgdesc="A scalable distributed SCM tool"
2013-05-12 07:10:13 +08:00
arch=('x86_64')
url="http://www.selenic.com/mercurial"
license=('GPL')
depends=('python2')
optdepends=('tk: for the hgk GUI')
2011-11-26 21:42:11 +08:00
source=("http://www.selenic.com/mercurial/release/${pkgname}-${pkgver}.tar.gz"
2012-07-08 01:49:33 +08:00
'mercurial.profile')
2013-05-12 07:10:13 +08:00
md5sums=('d012d8bb5f85369d3b6a630a80667170'
'43e1d36564d4c7fbe9a091d3ea370a44')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
2012-07-08 01:49:33 +08:00
python2 setup.py install --root="${pkgdir}" --optimize=1
2013-05-12 07:10:13 +08:00
sed -i -e 's#env python#env python2#' \
"${pkgdir}"/usr/lib/python2.7/site-packages/mercurial/lsprof.py
install -d ${pkgdir}/usr/share/man/{man1,man5}
2012-07-08 01:49:33 +08:00
install -m644 doc/hg.1 "${pkgdir}/usr/share/man/man1"
install -m644 doc/{hgrc.5,hgignore.5} "${pkgdir}/usr/share/man/man5"
install -m755 contrib/hgk "${pkgdir}/usr/bin"
install -m644 -D contrib/zsh_completion "${pkgdir}/usr/share/zsh/site-functions/_hg"
install -m644 -D contrib/bash_completion "${pkgdir}/etc/bash_completion.d/hg"
install -d "${pkgdir}/usr/share/emacs/site-lisp"
2012-07-08 01:49:33 +08:00
install -m644 contrib/{mq.el,mercurial.el} "${pkgdir}/usr/share/emacs/site-lisp"
vimpath="${pkgdir}/usr/share/vim/vimfiles"
2012-07-08 01:49:33 +08:00
install -Dm644 contrib/vim/HGAnnotate.vim "${vimpath}/syntax/HGAnnotate.vim"
# set some variables
install -m755 -d ${pkgdir}/etc/profile.d
2012-07-08 01:49:33 +08:00
install -m755 ${srcdir}/mercurial.profile "${pkgdir}/etc/profile.d/mercurial.sh"
2013-05-12 07:10:13 +08:00
# install configuration file
install -m755 -d ${pkgdir}/etc/mercurial
install -m644 contrib/sample.hgrc "${pkgdir}/etc/mercurial/hgrc"
}