upgpkg: sbcl 2.2.5-1
[arch-packages.git] / booster / repos / extra-x86_64 / PKGBUILD
blob472fd6e5b3bf97273b2e319c383ba0bf13e43142
1 # Maintainer: Anatol Pomozov
3 pkgname=booster
4 pkgver=0.8
5 pkgrel=1
6 pkgdesc='Fast and secure initramfs generator'
7 arch=(x86_64)
8 url='https://github.com/anatol/booster'
9 license=(MIT)
10 depends=(bash)
11 makedepends=(go ruby-ronn-ng)
12 #checkdepends=(qemu-headless linux tang)
13 optdepends=(
14   'busybox: to enable emergency shell at the boot time'
15   'yubikey-personalization: for clevis Yubikey challenge-response support'
16   'libfido2: for systemd-enroll with FIDO2'
18 backup=(etc/booster.yaml)
19 provides=(initramfs)
20 source=(booster-$pkgver.zip::https://github.com/anatol/booster/archive/$pkgver.zip)
21 sha512sums=('41c189e59db9ed4ca654e2916843c51bcaa98a42b8cda355fa2ac8a806250b851dc460d150401b3a9c1ac79828f0dbb9d96bab796f8ba298c900360e593bf6a6')
23 build() {
24   cd booster-$pkgver
26   cd generator
27   CGO_CPPFLAGS="${CPPFLAGS}" CGO_CFLAGS="${CFLAGS}" CGO_CXXFLAGS="${CXXFLAGS}" CGO_LDFLAGS="${LDFLAGS}" \
28     go build -trimpath \
29       -buildmode=pie \
30       -mod=readonly \
31       -modcacherw \
32       -ldflags "-linkmode external -extldflags \"${LDFLAGS}\""
34   cd ../init
35   CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
37   cd ..
38   ronn docs/manpage.md
41 check() {
42   cd booster-$pkgver
44   # (cd init; go test)
45   # (cd generator; go test)
47   # arch chroot does not allow access to KVM
48   # TEST_DISABLE_KVM=1 go test -v # disable integration tests for now as it require a lot of time and space to build 10G images
51 package() {
52   cd booster-$pkgver
53   mkdir "$pkgdir/etc/"
54   touch "$pkgdir/etc/booster.yaml"
55   install -Dp -m755 generator/generator "$pkgdir/usr/bin/booster"
56   install -Dp -m644 docs/manpage.1 "$pkgdir/usr/share/man/man1/booster.1"
57   install -Dp -m755 init/init "$pkgdir/usr/lib/booster/init"
58   install -Dp -m755 packaging/arch/regenerate_images "$pkgdir/usr/lib/booster/regenerate_images"
60   install -Dp -m644 packaging/arch/90-booster-install.hook "$pkgdir/usr/share/libalpm/hooks/90-booster-install.hook"
61   install -Dp -m755 packaging/arch/booster-install "$pkgdir/usr/share/libalpm/scripts/booster-install"
62   install -Dp -m644 packaging/arch/60-booster-remove.hook "$pkgdir/usr/share/libalpm/hooks/60-booster-remove.hook"
63   install -Dp -m755 packaging/arch/booster-remove "$pkgdir/usr/share/libalpm/scripts/booster-remove"
64   install -Dp -m755 contrib/completion/bash "$pkgdir/usr/share/bash-completion/completions/booster"