George Rawlinson
095e04b129
* New upstream release. * Ensure /etc/sudoers.d has the correct permissions.
41 lines
1.4 KiB
Bash
41 lines
1.4 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
pkgname=distrobuilder-create
|
|
pkgver=0.2
|
|
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')
|
|
|
|
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"
|
|
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"
|
|
}
|