summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD35
-rw-r--r--coredns-sysusers.conf1
-rw-r--r--coredns.service19
5 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3531915d0388
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = popuradns
+ pkgdesc = A simple DNS server with decentralized domain names support
+ pkgver = 0.1.0
+ pkgrel = 1
+ url = https://github.com/popura-network/PopuraDNS
+ arch = i686
+ arch = x86_64
+ license = Apache
+ makedepends = go
+ provides = coredns
+ conflicts = coredns
+ source = PopuraDNS-0.1.0.tar.gz::https://github.com/popura-network/PopuraDNS/archive/refs/tags/v0.1.0.tar.gz
+ source = coredns.service
+ source = coredns-sysusers.conf
+ sha256sums = 52aa97b35b88bffebf42052139d90d2bad6615b646c01f99e41a09e10cfc021d
+ sha256sums = bbacde21632be9d7a9a758103775c768f9688372539b1b342ccf5c5db6746b4f
+ sha256sums = 536d03f8b20b0d2d6e8f96edd7e4e4dd7f6fef39ab0e952522d8725f3cc186b7
+
+pkgname = popuradns
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..0d15f0a63ebb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/pkg
+/pkg/**
+/src
+/src/**
+*.tar.zst
+*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2564ddc22038
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: rany <rany 2 at riseup dot net>
+pkgname=popuradns
+_pkgname='PopuraDNS'
+pkgver=0.1.0
+pkgrel=1
+pkgdesc="A simple DNS server with decentralized domain names support"
+makedepends=('go')
+arch=('i686' 'x86_64')
+url="https://github.com/popura-network/PopuraDNS"
+license=('Apache')
+provides=('coredns')
+conflicts=('coredns')
+source=(${_pkgname}-${pkgver}.tar.gz::https://github.com/popura-network/PopuraDNS/archive/refs/tags/v${pkgver}.tar.gz
+ coredns.service
+ coredns-sysusers.conf
+)
+
+sha256sums=('52aa97b35b88bffebf42052139d90d2bad6615b646c01f99e41a09e10cfc021d'
+ 'bbacde21632be9d7a9a758103775c768f9688372539b1b342ccf5c5db6746b4f'
+ '536d03f8b20b0d2d6e8f96edd7e4e4dd7f6fef39ab0e952522d8725f3cc186b7')
+
+build() {
+ export GOPATH="$srcdir/build"
+ export PATH=$GOPATH/bin:$PATH
+ cd $srcdir/${_pkgname}-${pkgver}
+ ./build.sh
+}
+
+package() {
+ install -Dm755 "$srcdir/${_pkgname}-${pkgver}/coredns" "$pkgdir/usr/bin/coredns"
+ install -Dm644 "$srcdir/coredns.service" "$pkgdir/usr/lib/systemd/system/coredns.service"
+ install -Dm644 "$srcdir/coredns-sysusers.conf" "$pkgdir/usr/lib/sysusers.d/coredns.conf"
+ install -d "${pkgdir}/etc/coredns"
+ install -Dm644 "$srcdir/${_pkgname}-${pkgver}/Corefile" "${pkgdir}/etc/coredns/Corefile"
+}
diff --git a/coredns-sysusers.conf b/coredns-sysusers.conf
new file mode 100644
index 000000000000..0a529bd05ea5
--- /dev/null
+++ b/coredns-sysusers.conf
@@ -0,0 +1 @@
+u coredns - "CoreDNS is a DNS server that chains plugins "
diff --git a/coredns.service b/coredns.service
new file mode 100644
index 000000000000..cfd1a19f5703
--- /dev/null
+++ b/coredns.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=CoreDNS DNS server
+Documentation=https://coredns.io
+After=network.target
+
+[Service]
+PermissionsStartOnly=true
+LimitNOFILE=1048576
+LimitNPROC=512
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+NoNewPrivileges=true
+User=coredns
+ExecStart=/usr/bin/coredns -conf=/etc/coredns/Corefile
+ExecReload=/bin/kill -SIGUSR1 $MAINPID
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target