summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzlowly2019-11-05 15:02:41 +0800
committerzlowly2019-11-05 15:02:41 +0800
commit092eb44266f92a44377d4ebec86226383835aca3 (patch)
tree06ce066bdfdf43d9f0d8a1d65f819da26505eb28
downloadaur-092eb44266f92a44377d4ebec86226383835aca3.tar.gz
initial version
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD22
-rw-r--r--smartdns.patch24
3 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e3e8086cc581
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = smartdns
+ pkgdesc = Local DNS server that accepts DNS query requests from local clients, obtains DNS query results from multiple upstream DNS servers, and returns the fastest access results to clients.
+ pkgver = 1.2019.05.21
+ pkgrel = 1
+ url = https://github.com/pymumu/smartdns
+ arch = x86_64
+ license = GPL3
+ depends = openssl-1.0
+ source = https://github.com/pymumu/smartdns/releases/download/Release25/smartdns.1.2019.05.21-2250.x86_64.tar.gz
+ source = smartdns.patch
+ md5sums = a523051f8ee0a66d9c6880e7876917cd
+ md5sums = 2481e2bdb5bf5c140107fef66f13151f
+
+pkgname = smartdns
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fae3a57bbef1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,22 @@
+# Maintainer: zlowly <zlowly@gmail.com>
+pkgname=smartdns
+pkgver=1.2019.05.21
+pkgrel=1
+pkgdesc="Local DNS server that accepts DNS query requests from local clients, obtains DNS query results from multiple upstream DNS servers, and returns the fastest access results to clients."
+arch=("x86_64")
+url="https://github.com/pymumu/smartdns"
+license=("GPL3")
+depends=('openssl-1.0')
+source=("https://github.com/pymumu/smartdns/releases/download/Release25/smartdns.$pkgver-2250.$CARCH.tar.gz" "$pkgname.patch")
+md5sums=('a523051f8ee0a66d9c6880e7876917cd'
+ '2481e2bdb5bf5c140107fef66f13151f')
+prepare() {
+ patch -p1 "$srcdir/$pkgname/systemd/smartdns.service" < "$pkgname.patch"
+}
+package() {
+ cd $pkgname
+ install -Dm755 src/smartdns "$pkgdir/usr/bin/smartdns"
+ install -Dm640 etc/smartdns/smartdns.conf "$pkgdir/etc/smartdns/smartdns.conf"
+ install -Dm640 etc/default/smartdns "$pkgdir/etc/default/smartdns"
+ install -Dm644 systemd/smartdns.service "$pkgdir/usr/lib/systemd/system/smartdns.service"
+}
diff --git a/smartdns.patch b/smartdns.patch
new file mode 100644
index 000000000000..bc511092ff92
--- /dev/null
+++ b/smartdns.patch
@@ -0,0 +1,24 @@
+--- smartdns.service.old 2019-09-24 10:41:44.487335094 +0800
++++ smartdns.service.new 2019-09-24 10:44:43.832401460 +0800
+@@ -1,17 +1,17 @@
+ [Unit]
+ Description=smart dns server
+ After=network.target
++StartLimitBurst=0
++StartLimitIntervalSec=60
+
+ [Service]
+ Type=forking
+-PIDFile=/var/run/smartdns.pid
++PIDFile=/run/smartdns.pid
+ EnvironmentFile=/etc/default/smartdns
+-ExecStart=/usr/sbin/smartdns $SMART_DNS_OPTS
++ExecStart=/usr/bin/smartdns $SMART_DNS_OPTS
+ KillMode=process
+ Restart=always
+ RestartSec=2
+-StartLimitBurst=0
+-StartLimitIntervalSec=60
+
+ [Install]
+ WantedBy=multi-user.target