From 6e9233c21d2d924bb8be98cb3818054ac69124e5 Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Fri, 27 Dec 2019 00:28:49 -0500 Subject: [PATCH] add pkgbuild --- PKGBUILD | 33 +++++++++++++++++++++++++++++++++ aux/systemd/bunbun.service | 13 +++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 PKGBUILD create mode 100644 aux/systemd/bunbun.service diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..76bccf5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: Edward Shen +pkgname=bunbun +pkgver=0.4.1 +pkgrel=1 +depends=('gcc-libs') +makedepends=('rust' 'cargo') +arch=('i686' 'x86_64' 'armv6h' 'armv7h') +pkgdesc="Re-implementation of bunny1 in Rust" +url="https://github.com/edward-shen/bunbun" +license=('AGPL') +source=("$pkgname-$pkgver.tar.gz::https://github.com/edward-shen/$pkgname/archive/$pkgver.tar.gz") +sha512sums=('b8576b40e1912bb651b12a8adb591c93fe60116ea5870a77852789fcd3e5027438847120cd1f2549271365de1ba1387145d026c035473ab510e3628fe791458e') + +build() { + cd "$pkgname-$pkgver" + + cargo build --release --locked + strip "target/release/$pkgname" || true +} + +check() { + cd "$pkgname-$pkgver" + + cargo test --release --locked +} + +package() { + cd "$pkgname-$pkgver" + + install -Dm755 "target/release/$pkgname" -t "$pkgdir/usr/bin" + install -Dm644 "$srcdir/aux/systemd/$pkgname.service" -t "$pkgdir/usr/lib/systemd/system" + install -Dm644 "$srcdir/$pkgname.default.yaml" "$pkgdir/etc/$pkgname.yaml" +} diff --git a/aux/systemd/bunbun.service b/aux/systemd/bunbun.service new file mode 100644 index 0000000..741a59c --- /dev/null +++ b/aux/systemd/bunbun.service @@ -0,0 +1,13 @@ +[Unit] +Description=Bunbun search multiplexer/jump service +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=always +RestartSec=1 +ExecStart=/usr/bin/bunbun + +[Install] +WantedBy=multi-user.target