blob: 9bce4d05ec4ae2296cd1176e2f99b9ee04cdedf1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Maintainer: Radu Potop <radu at wooptoo dot com>
# Contributor: Guillaume Lefranc <guillaume@signal18.io>
#
# Forked from aur/nextdns.
#
# Instead of running the NextDNS Client as root this package configures
# it to run as a regular user under Systemd.
#
# It is not recommended to run the upstream "nextdns install" script,
# instead enable the service with "systemctl enable --now nextdns".
#
pkgname=nextdns-unprivileged
origname=nextdns
pkgver=1.43.5
pkgrel=1
pkgdesc='The NextDNS DoH client running as unprivileged user.'
arch=('x86_64')
url='https://github.com/nextdns/nextdns'
license=('MIT')
conflicts=('nextdns')
provides=('nextdns')
install="$origname.install"
makedepends=('go')
source=(
"$url/archive/v$pkgver.tar.gz"
"nextdns.service"
"nextdns.sysusers"
"01-socket.patch"
)
options=(!lto)
prepare() {
cd "${origname}-$pkgver"
patch -Np1 < ../01-socket.patch
}
build() {
cd "${origname}-$pkgver"
go build --buildmode=pie -trimpath -ldflags "-X main.version=$pkgver -extldflags $LDFLAGS" -o ${origname} .
}
package() {
cd "${origname}-$pkgver"
install -vDm 755 ${origname} "${pkgdir}/usr/bin/${origname}"
install -vDm 644 "$srcdir/${origname}.service" "${pkgdir}/usr/lib/systemd/system/${origname}.service"
install -vDm 644 "$srcdir/${origname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${origname}.conf"
}
sha256sums=('743f64d876c2c7afdae47716af1d41a6c5ec21adae74a318e5eb9319023a38c2'
'44b78be27eb618e2d93b4b480c9aef38d413bde3f8bfa6af20d651f0bf8c8b62'
'96dcfb0ccbbf30a140ff44101b90160faadca97f9aed4b1d73e2e2db52655fec'
'df831b86096e2f06fd4b9f603a4141daef986d709fcdebb97f39493535aab7f6')
|