summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD43
2 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1f52a0c443b2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = nsncd-git
+ pkgdesc = nscd-compatible daemon that proxies lookups, without caching.
+ pkgver = r89.82dd540
+ pkgrel = 1
+ url = https://github.com/twosigma/nsncd
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = cargo
+ options = !lto
+ source = nsncd::git+https://github.com/twosigma/nsncd.git
+ b2sums = SKIP
+
+pkgname = nsncd-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7f060c672fb8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Jiuyang Liu <liu@jiuyang.me>
+
+_pkgname=nsncd
+pkgname=nsncd-git
+pkgver=r89.82dd540
+pkgrel=1
+pkgdesc='nscd-compatible daemon that proxies lookups, without caching.'
+arch=('x86_64')
+url='https://github.com/twosigma/nsncd'
+license=('MIT')
+makedepends=('git' 'cargo')
+options=('!lto')
+source=("$_pkgname::git+$url.git")
+b2sums=('SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$_pkgname"
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "$_pkgname"
+ cargo build --frozen --release --all-features
+}
+
+package() {
+ cd "$_pkgname"
+
+ # binary
+ install -vDm755 -t "$pkgdir/usr/bin" "target/release/$_pkgname"
+
+ # license
+ install -vDm644 -t "$pkgdir/usr/share/licenses/$_pkgname" LICENSE
+
+ # systemd
+ install -vDm644 $_pkgname.service "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
+ sed -i "s:^ExecStart.*:ExecStart=/usr/bin/$_pkgname:" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
+}