95 lines
3.6 KiB
Bash
95 lines
3.6 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgname=mercurial
|
|
pkgver=6.4.2
|
|
pkgrel=02
|
|
pkgdesc='A scalable distributed SCM tool'
|
|
url="https://www.mercurial-scm.org/"
|
|
depends=(python)
|
|
makedepends=(python-docutils)
|
|
#makedepends=(python-build python-installer python-setuptools python-wheel python-docutils)
|
|
optdepends=('tk: for the hgk GUI')
|
|
#checkdepends=('breezy' 'cvs' 'git' 'git-lfs' 'python-docutils' 'subversion' 'unzip')
|
|
|
|
# ToDo:
|
|
# check included contrib/packaging/mercurial.spec and how BLFS/Gentoo/Debian/Fedora do it
|
|
# the following should be either makedepends or checkdepends when running tests
|
|
# 'python-gnupg' 'python-pygments' 'python-pyflakes' 'python-pyopenssl'
|
|
# 'openssh' 'rust' 'subversion' 'breezy' 'cvs' 'git')
|
|
|
|
backup=(etc/mercurial/hgrc)
|
|
source=(https://www.mercurial-scm.org/release/${pkgname}-${pkgver}.tar.gz{,.asc}
|
|
mercurial.profile)
|
|
|
|
build() {
|
|
cd $pkgname-$pkgver
|
|
# python -m build --wheel --no-isolation
|
|
# from an older build - kept for reference
|
|
python setup.py build
|
|
make -C contrib/chg
|
|
}
|
|
|
|
check() {
|
|
cd $pkgname-$pkgver/tests
|
|
# # TODO - disabled for now - too many tests fail
|
|
# python run-tests.py # -j48 || :
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$pkgver
|
|
# python -m installer --destdir="$pkgdir" dist/*.whl
|
|
## also from the older build
|
|
python setup.py install --root="$pkgdir" --skip-build --optimize=1
|
|
make DESTDIR="${pkgdir}" PREFIX=/usr install
|
|
|
|
install -m644 -D contrib/zsh_completion "$pkgdir/usr/share/zsh/site-functions/_hg"
|
|
install -m644 -D contrib/bash_completion "$pkgdir/usr/share/bash-completion/completions/hg"
|
|
|
|
make -C contrib/chg DESTDIR="$pkgdir" PREFIX=/usr install
|
|
install -m755 contrib/hg-ssh "$pkgdir/usr/bin"
|
|
install -m755 contrib/hgk "$pkgdir/usr/bin"
|
|
|
|
install -d "$pkgdir/usr/share/emacs/site-lisp"
|
|
install -m644 contrib/{mq.el,mercurial.el} "$pkgdir/usr/share/emacs/site-lisp"
|
|
|
|
install -Dm644 contrib/vim/HGAnnotate.vim \
|
|
"$pkgdir/usr/share/vim/vimfiles/syntax/HGAnnotate.vim"
|
|
|
|
# set some variables
|
|
install -m755 -d "$pkgdir/etc/profile.d"
|
|
install -m644 "$srcdir/mercurial.profile" "$pkgdir/etc/profile.d/mercurial.sh"
|
|
|
|
# FS#38825 - Add certs config to package
|
|
install -m755 -d "$pkgdir/etc/mercurial"
|
|
cat <<-EOF > "$pkgdir/etc/mercurial/hgrc"
|
|
[web]
|
|
cacerts = /etc/ssl/certs/ca-certificates.crt
|
|
EOF
|
|
}
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=(GPL)
|
|
|
|
validpgpkeys=(2BCCE14F5C6725AA2EA8AEB7B9C9DC824AA5BDD5 #
|
|
EB851395B4223EE2F7BA0B28DA54740BF08732BA #
|
|
818D87CD1AC180C394C86E633A33DE460D9EC39F # Pulkit Goyal <7895pulkit@gmail.com>
|
|
1F66F8CDF654E905C11DA061A11E01CD0E05D956) # Raphaël Gomès <alphare@raphaelgomes.dev>
|
|
|
|
sha512sums=('6a64ec31ecf60d1fe8ffeee40293302a69583d29969b7344b9b4c186c8086078b13b2983db1cf12711fefb150aac80c95b5f35898d3d767fd81a3cd7791c0882'
|
|
'SKIP'
|
|
'710dcddb24d928efc97370e869d9caa083107929ed9a1086dd2a3ae0caaf2c71e2f29060597e29315b6b15b1616251c42412e268ce737109c48ae4d7aa1b9555')
|
|
|
|
sha256sums=(5b9f6a3c35f4e4695c854ef71428cf9461ca1a529f691c06dc6f7b48e7bb3335 # mercurial-6.4.2.tar.gz
|
|
a6be785d0449bc8d07769e83b609279cc05269ec4267f896adb5e579bc5589cd # mercurial-6.4.2.tar.gz.asc
|
|
87427151713e689cd87dc50d50c048e0e58285815e4eb61962b50583532cbde5) # mercurial.profile
|
|
|
|
## cd59fab3bd68743ee1e1fc71708d1822de411fd0a0940d3010959983901c00b1 mercurial-6.4.2-02-x86_64.pkg.tar.lz
|