60 lines
1.6 KiB
Bash
Raw Normal View History

2019-11-03 20:54:36 -08:00
# Maintainer: Eric Torres <erictorres4@protonmail.com>
pkgname=packaging-scripts
2022-03-24 22:02:03 -07:00
pkgver=1.7.1
2022-03-19 00:18:29 -07:00
pkgrel=1
2019-11-03 20:54:36 -08:00
pkgdesc="A set of helper scripts for handling Arch Linux packages"
arch=('any')
license=('MIT')
groups=(pacman-helpers)
2022-03-17 23:41:00 -07:00
depends=(gist pacman python)
makedepends=(git python-setuptools)
2019-11-03 20:54:36 -08:00
optdepends=('fzf: for the fqo script'
'mlocate: for the fqo script')
2022-12-06 23:48:12 -08:00
checkdepends=(python-hypothesis python-pytest python-sphinx)
2022-03-17 21:18:17 -07:00
backup=(etc/apparmor.d/usr.bin.{addpkg,delpkg}
etc/packaging-scripts.conf)
source=("${pkgname}::git+file:///home/etorres/Projects/packaging-scripts")
sha256sums=('SKIP')
2019-11-03 20:54:36 -08:00
2022-03-22 09:09:23 -07:00
pkgver() {
cd $srcdir/$pkgname
python setup.py --version
}
2019-11-03 20:54:36 -08:00
build() {
2022-03-17 23:04:05 -07:00
cd $srcdir/$pkgname
2019-11-03 20:54:36 -08:00
python setup.py build
}
check() {
2022-03-17 23:04:05 -07:00
cd $srcdir/$pkgname
2019-11-03 20:54:36 -08:00
python -m unittest
}
package() {
2022-03-17 23:04:05 -07:00
cd $srcdir/$pkgname
2019-11-03 20:54:36 -08:00
python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
# install README
install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
2022-03-17 21:18:17 -07:00
# install config file
install -Dm644 'misc/packaging-scripts.conf' "${pkgdir}/etc/packaging-scripts.conf"
2019-11-03 20:54:36 -08:00
# install AppArmor profiles
for profile in misc/apparmor/*; do
install -Dm644 "${profile}" "${pkgdir}/etc/apparmor.d/${profile##*/}"
done
# install pug hook
install -Dm644 'misc/pug.hook' "${pkgdir}/usr/share/libalpm/hooks/pug.hook"
2019-11-03 20:54:36 -08:00
# install zsh completions
install -d "${pkgdir}/usr/share/zsh/site-functions"
for completion in packaging_scripts/zsh-completions/*; do
install -m644 "${completion}"\
"${pkgdir}/usr/share/zsh/site-functions/${completion##*/*}"
done
}