57 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
pkgver=1.7.1
2023-01-06 21:37:18 -08:00
pkgrel=2
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)
2023-01-06 21:54:09 -08:00
depends=(gist mlocate pacman python pyalpm)
makedepends=(git python-setuptools)
2019-11-03 20:54:36 -08:00
optdepends=('fzf: for the fqo script'
'mlocate: for the fqo script')
checkdepends=(python-hypothesis python-pytest)
2023-05-03 15:39:11 -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
build() {
2023-01-06 21:37:18 -08:00
cd "$srcdir/$pkgname"
2019-11-03 20:54:36 -08:00
python setup.py build
}
check() {
2023-01-06 21:37:18 -08:00
cd "$srcdir/$pkgname"
2019-11-03 20:54:36 -08:00
python -m unittest
}
package() {
2023-01-06 21:37:18 -08: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
2023-01-06 21:54:09 -08:00
# install license
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
2019-11-03 20:54:36 -08:00
}