summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD26
-rw-r--r--dcompass@.service11
-rw-r--r--sysusers.conf1
4 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..603515de2d0b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = dcompass-bin
+ pkgdesc = A high-performance programmable DNS component aiming at robustness, speed, and flexibility (binary release)
+ pkgver = 20210812_0958
+ pkgrel = 1
+ url = https://github.com/compassd/dcompass
+ arch = x86_64
+ license = GPL3
+ provides = dcompass
+ conflicts = dcompass
+ source = dcompass::https://github.com/compassd/dcompass/releases/download/build-20210812_0958/dcompass-x86_64-unknown-linux-musl-full
+ source = dcompass@.service
+ source = sysusers.conf
+ sha512sums = e2034c13e085641ab43998fbc277aea4b92013ccafed89fe26513d5c5760122103a840a8817ec186222e6fe8b58af3610800e05b2e8528674d0c9e39825524da
+ sha512sums = 306070613217509953f7d6b7054b1fcc3892c8cb10258381bd7c2bcd0ffc4804f2cd1eb1dfad290da9cff390e3000b7995554a5ad3c3e10e526ff593aa1c1671
+ sha512sums = dba3cf9dde2749b0b8631f4dfcd84c66bda99023eac5f9e77728f4eafefe8f7e2ed338c48e75463b41bd0a97975b0259e3194c4ec9f2ba5ff5989c940c714838
+
+pkgname = dcompass-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6fb9eb7ecfb3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: 4679 <4679 at pm dot me>
+
+pkgname=dcompass-bin
+_pkgbase=dcompass
+pkgver=20210812_0958
+pkgrel=1
+pkgdesc='A high-performance programmable DNS component aiming at robustness, speed, and flexibility (binary release)'
+arch=('x86_64')
+url='https://github.com/compassd/dcompass'
+license=('GPL3')
+provides=('dcompass')
+conflicts=('dcompass')
+source=("$_pkgbase::https://github.com/compassd/$_pkgbase/releases/download/build-$pkgver/dcompass-x86_64-unknown-linux-musl-full"
+ 'dcompass@.service'
+ 'sysusers.conf')
+
+sha512sums=('e2034c13e085641ab43998fbc277aea4b92013ccafed89fe26513d5c5760122103a840a8817ec186222e6fe8b58af3610800e05b2e8528674d0c9e39825524da'
+ '306070613217509953f7d6b7054b1fcc3892c8cb10258381bd7c2bcd0ffc4804f2cd1eb1dfad290da9cff390e3000b7995554a5ad3c3e10e526ff593aa1c1671'
+ 'dba3cf9dde2749b0b8631f4dfcd84c66bda99023eac5f9e77728f4eafefe8f7e2ed338c48e75463b41bd0a97975b0259e3194c4ec9f2ba5ff5989c940c714838')
+
+package() {
+ install -Dm755 "$srcdir/${_pkgbase}" "${pkgdir}/usr/bin/${_pkgbase}"
+ install -Dm644 "$srcdir/sysusers.conf" "$pkgdir/usr/lib/sysusers.d/dcompass.conf"
+ install -Dm644 "$srcdir/dcompass@.service" "$pkgdir/usr/lib/systemd/system/dcompass@.service"
+ install -dm755 "$pkgdir/etc/dcompass"
+}
diff --git a/dcompass@.service b/dcompass@.service
new file mode 100644
index 000000000000..25660e5eac01
--- /dev/null
+++ b/dcompass@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Dcompass DNS server Service
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/dcompass -c /etc/dcompass/%i.yaml
+User=dcompass
+AmbientCapabilities=CAP_NET_BIND_SERVICE
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sysusers.conf b/sysusers.conf
new file mode 100644
index 000000000000..3a37779ff27c
--- /dev/null
+++ b/sysusers.conf
@@ -0,0 +1 @@
+u dcompass - "Dcompass user"