2019-11-03 20:54:36 -08:00
|
|
|
# Maintainer: Eric Torres <erictorres4@protonmail.com>
|
|
|
|
pkgname=packaging-scripts
|
2023-05-03 15:49:58 -07:00
|
|
|
pkgver=1.7.1
|
2023-06-07 15:27:02 -07:00
|
|
|
pkgrel=3
|
2019-11-03 20:54:36 -08:00
|
|
|
pkgdesc="A set of helper scripts for handling Arch Linux packages"
|
|
|
|
arch=('any')
|
|
|
|
license=('MIT')
|
2022-03-17 22:45:35 -07:00
|
|
|
groups=(pacman-helpers)
|
2023-01-06 21:54:09 -08:00
|
|
|
depends=(gist mlocate pacman python pyalpm)
|
2022-03-17 22:45:35 -07:00
|
|
|
makedepends=(git python-setuptools)
|
2019-11-03 20:54:36 -08:00
|
|
|
optdepends=('fzf: for the fqo script'
|
|
|
|
'mlocate: for the fqo script')
|
2023-05-03 15:49:58 -07:00
|
|
|
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)
|
2022-03-17 22:45:35 -07:00
|
|
|
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
|
|
|
|
|
2022-03-17 22:45:35 -07:00
|
|
|
# install pug hook
|
2022-03-17 23:21:26 -07:00
|
|
|
install -Dm644 'misc/pug.hook' "${pkgdir}/usr/share/libalpm/hooks/pug.hook"
|
2022-03-17 22:45:35 -07:00
|
|
|
|
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
|
|
|
}
|