Christoph Reiter a2ee04bf00 More CPEs
2024-03-24 20:09:34 +01:00

77 lines
2.6 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgname=mercurial
pkgver=6.7.1
pkgrel=1
pkgdesc="A scalable distributed SCM tool"
arch=('i686' 'x86_64')
url="https://www.mercurial-scm.org/"
msys2_references=(
"pypi:mercurial"
"cpe: cpe:/a:mercurial:mercurial"
)
license=('spdx:GPL-2.0-or-later')
groups=('VCS')
depends=('python')
makedepends=(
'python-devel'
'gcc'
"python-setuptools"
"python-wheel"
"python-build"
"python-installer"
)
#optdepends=('tk: for the hgk GUI')
backup=('etc/mercurial/hgrc')
source=("https://mercurial-scm.org/release/${pkgname}-${pkgver}.tar.gz"{,.asc}
'mercurial.profile')
sha256sums=('9b0eda5d0d0ddb8b31e9c76aa06fc55fd2ffb02bc3614de0b1437336b2fc1254'
'SKIP'
'87427151713e689cd87dc50d50c048e0e58285815e4eb61962b50583532cbde5')
validpgpkeys=(2BCCE14F5C6725AA2EA8AEB7B9C9DC824AA5BDD5
3A8155163D0E20A530FCB78647A67FFAA346AACE
EB851395B4223EE2F7BA0B28DA54740BF08732BA
818D87CD1AC180C394C86E633A33DE460D9EC39F # Pulkit Goyal <7895pulkit@gmail.com>
1F66F8CDF654E905C11DA061A11E01CD0E05D956) # Raphaël Gomès <alphare@raphaelgomes.dev>
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -d ${pkgdir}/usr/share/man/{man1,man5}
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}/usr/share/bash-completion/completions/hg"
install -d "${pkgdir}/usr/share/emacs/site-lisp"
install -m644 contrib/{mq.el,mercurial.el} "${pkgdir}/usr/share/emacs/site-lisp"
vimpath="${pkgdir}/usr/share/vim/vimfiles"
install -Dm644 contrib/vim/HGAnnotate.vim "${vimpath}/syntax/HGAnnotate.vim"
# set some variables
install -m755 -d ${pkgdir}/etc/profile.d
install -m755 ${srcdir}/mercurial.profile "${pkgdir}/etc/profile.d/mercurial.sh"
# install configuration file
install -m755 -d ${pkgdir}/etc/mercurial
#install -m644 contrib/sample.hgrc "${pkgdir}/etc/mercurial/hgrc"
# FS#38825 - Add certs config to package
echo -e "\n[web]\ncacerts = /usr/ssl/certs/ca-bundle.crt\n" >> "${pkgdir}/etc/mercurial/hgrc"
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}