summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD40
-rw-r--r--dnspod-sr.service11
3 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..23951ceebb6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = dnspod-sr-git
+ pkgdesc = A faster recursive dns server from DNSPod
+ pkgver = 32550ab
+ pkgrel = 1
+ url = https://github.com/DNSPod/dnspod-sr
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ depends = glibc
+ source = git://github.com/DNSPod/dnspod-sr.git
+ source = dnspod-sr.service
+ sha512sums = SKIP
+ sha512sums = 1b5540a23dddb7633e1d76a750146ab457bc2086c7cf77489f5ef6025a00528df6f2a6cf1dd8ec93a8b1b7b03c6006e2b144097a2abdb2af755afd1dde874487
+
+pkgname = dnspod-sr-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..3782903ea25
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Felix Yan <felixonmars@gmail.com>
+
+pkgname=dnspod-sr-git
+_pkgname=dnspod-sr
+pkgver=32550ab
+pkgrel=1
+pkgdesc="A faster recursive dns server from DNSPod"
+arch=('i686' 'x86_64')
+url="https://github.com/DNSPod/dnspod-sr"
+license=('BSD')
+makedepends=('git')
+depends=('glibc')
+source=("git://github.com/DNSPod/dnspod-sr.git"
+ dnspod-sr.service)
+
+pkgver() {
+ cd "$srcdir/$_pkgname"
+ git describe --always | sed 's|-|.|g'
+}
+
+build() {
+ cd "$srcdir/$_pkgname/src"
+ sed -e "s|\.\./log/|/var/log/|" -i ../sr.conf
+ sed -e "s|\.\./root.z|/usr/share/$pkgname/root.z|" -i io.c
+ make
+}
+
+package() {
+ cd "$srcdir/$_pkgname"
+
+ install -Dm755 src/dnspod-sr "$pkgdir/usr/bin/dnspod-sr"
+ install -Dm644 root.z "$pkgdir/usr/share/$pkgname/root.z"
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 sr.conf "$pkgdir/etc/${_pkgname}.conf"
+ install -Dm644 ../dnspod-sr.service "$pkgdir/usr/lib/systemd/system/dnspod-sr.service"
+}
+
+sha512sums=('SKIP'
+ '1b5540a23dddb7633e1d76a750146ab457bc2086c7cf77489f5ef6025a00528df6f2a6cf1dd8ec93a8b1b7b03c6006e2b144097a2abdb2af755afd1dde874487')
diff --git a/dnspod-sr.service b/dnspod-sr.service
new file mode 100644
index 00000000000..a0b32d9957e
--- /dev/null
+++ b/dnspod-sr.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=DNSPod Security Recursive DNS Server
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/dnspod-sr /etc/dnspod-sr.conf
+
+[Install]
+WantedBy=multi-user.target
+