summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatol Pomozov2020-12-11 15:09:05 -0800
committerAnatol Pomozov2020-12-11 15:12:10 -0800
commit2bb68b2ee946e2c0a4a320d113207b2baeb81cff (patch)
treeaceabb05b830c6846cad94d39208cadb8754ba6a
downloadaur-2bb68b2ee946e2c0a4a320d113207b2baeb81cff.tar.gz
init
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD45
2 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b65f27df3c0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = booster-git
+ pkgdesc = Fast and secure initramfs generator
+ pkgver = r1.58ee91b
+ pkgrel = 1
+ url = http://github.com/anatol/booster
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = go
+ depends = bash
+ source = git+https://github.com/anatol/booster#branch=develop
+ sha512sums = SKIP
+
+pkgname = booster-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..277c46d7851
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Anatol Pomozov
+
+pkgname=booster-git
+pkgver=r1.58ee91b
+pkgrel=1
+pkgdesc='Fast and secure initramfs generator'
+arch=(x86_64)
+url='http://github.com/anatol/booster'
+license=(MIT)
+depends=(bash)
+makedepends=(git go)
+#checkdepends=(qemu-headless linux)
+source=(git+https://github.com/anatol/booster#branch=develop)
+sha512sums=('SKIP')
+
+pkgver() {
+ cd booster
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd $srcdir/booster/generator
+ CGO_CPPFLAGS="${CPPFLAGS}" CGO_CFLAGS="${CFLAGS}" CGO_CXXFLAGS="${CXXFLAGS}" CGO_LDFLAGS="${LDFLAGS}" \
+ go build -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-linkmode external -extldflags \"${LDFLAGS}\""
+
+ cd $srcdir/booster/init
+ CGO_ENABLED=0 go build -trimpath -mod=readonly -modcacherw
+}
+
+check() {
+ cd $srcdir/booster/tests
+ # go test -v this requires access to KVM that is not available in Arch chroot env
+}
+
+package() {
+ cd booster
+ install -Dp -m755 generator/booster "$pkgdir/usr/bin/booster"
+ install -Dp -m755 init/init "$pkgdir/usr/lib/booster/init"
+ install -Dp -m644 packaging/arch/90-booster.hook "$pkgdir/usr/share/libalpm/hooks/90-booster.hook"
+ install -Dp -m755 packaging/arch/booster-install "$pkgdir/usr/share/libalpm/scripts/booster-install"
+}