arch-pkgs/distrobuilder-create/PKGBUILD

42 lines
1.4 KiB
Text
Raw Normal View History

2021-09-11 08:22:05 +00:00
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
pkgname=distrobuilder-create
pkgver=0.2
2021-09-11 08:22:05 +00:00
pkgrel=1
pkgdesc="Automatically create images with distrobuilder"
arch=('any')
url="https://git.little.kiwi/grawlinson/distrobuilder-create"
license=('GPL')
depends=('lxd' 'distrobuilder' 'sudo' 'systemd')
checkdepends=('shfmt' 'shellcheck')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha512sums=('8d150c932d8a54130717d04fe8b1ab16bc5acc4b2972d8dec3ec6d5586bbcbd8277959a24af61671675f3592355e9b8a0b6241740d6d155e98cc4fd9ccb1ce20')
b2sums=('d87245965a362536ef3dcd036646c7eb638f631addaf99e21bbbb5bea2c30c29af8f1d81494cc49758d8cc294797b4e5ebd777c424a53ca2b6700a6a87ee9239')
2021-09-11 08:22:05 +00:00
check() {
cd "$pkgname"
# check formatting with shfmt
shfmt -i 2 -l distrobuilder-create.sh
# check syntax with shellcheck
shellcheck distrobuilder-create.sh
}
package() {
cd "$pkgname"
# script
install -vDm755 distrobuilder-create.sh "$pkgdir/usr/bin/$pkgname"
# drop-in sudoers snippet
install -vd 0750 "$pkgdir/etc/sudoers.d"
2021-09-11 08:22:05 +00:00
install -vDm440 sudoers.conf "$pkgdir/etc/sudoers.d/$pkgname"
# systemd integration
install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$pkgname@.service"
install -vDm644 systemd.timer "$pkgdir/usr/lib/systemd/system/$pkgname@.timer"
install -vDm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
}