summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzlowly2019-12-18 11:12:54 +0800
committerzlowly2019-12-18 11:12:54 +0800
commit42abe10da7b841dc080cd0162cdc9dd458487ffa (patch)
tree6f9a4f88e47b2c46d0329f54a0d8f93f81ec7268
downloadaur-42abe10da7b841dc080cd0162cdc9dd458487ffa.tar.gz
initial git version
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD37
-rw-r--r--smartdns.patch24
3 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2e9f79427fed
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = smartdns-git
+ 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 = r288.d6c3465
+ pkgrel = 1
+ url = https://github.com/pymumu/smartdns
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ depends = openssl-1.0
+ provides = smartdns
+ conflicts = smartdns
+ backup = etc/smartdns/smartdns.conf
+ source = smartdns::git+https://github.com/pymumu/smartdns.git
+ source = smartdns.patch
+ md5sums = SKIP
+ md5sums = 2481e2bdb5bf5c140107fef66f13151f
+
+pkgname = smartdns-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..af51feedfeba
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: zlowly <zlowly@gmail.com>
+pkgname=smartdns-git
+_pkgname=${pkgname%-git}
+pkgver=r288.d6c3465
+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')
+makedepends=('git')
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+source=("smartdns::git+https://github.com/pymumu/smartdns.git" "${_pkgname}.patch")
+backup=("etc/smartdns/smartdns.conf")
+md5sums=('SKIP'
+ '2481e2bdb5bf5c140107fef66f13151f')
+pkgver() {
+ cd "$srcdir/${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+prepare() {
+ cd "$srcdir"
+ patch -p1 "${_pkgname}/systemd/smartdns.service" < "${_pkgname}.patch"
+}
+build() {
+ cd "$srcdir/${_pkgname}"
+ make -C ./src clean
+ make -C ./src all VER=$pkgver
+}
+package() {
+ cd "$srcdir/${_pkgname}"
+ install -Dm755 src/smartdns "$pkgdir/usr/bin/smartdns"
+ install -Dm644 etc/smartdns/smartdns.conf "$pkgdir/etc/smartdns/smartdns.conf"
+ install -Dm644 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