1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Morten Linderud <foxboron@archlinux.org>
3 # Contributor: Sherlock Holo <sherlockya(at)gmail.com>
4 # Contributor: Ariel AxionL <i [at] axionl [dot] me>
9 pkgdesc="Client and server software to query DNS over HTTPS, using Google DNS-over-HTTPS protocol"
10 url="https://github.com/m13253/dns-over-https"
13 backup=('etc/dns-over-https/doh-client.conf'
14 'etc/dns-over-https/doh-server.conf')
15 provides=('dns-over-https-client' 'dns-over-https-server')
16 makedepends=('go' 'git')
18 source=("$pkgname-$pkgver.tar.gz::https://github.com/m13253/dns-over-https/archive/v$pkgver.tar.gz")
19 sha256sums=('cd95bf9594bacc2c97463bf745b072bd88523f0cd67e951002a3444f15dc59c4')
23 sed -i 's/\/local//g' systemd/doh-{client,server}.service
28 export GOFLAGS="-buildmode=pie -trimpath"
29 export CGO_LDFLAGS="${LDFLAGS}"
30 export CGO_CFLAGS="${CFLAGS}"
31 export CGO_CPPFLAGS="${CPPFLAGS}"
32 go build -v -o client ./doh-client
33 go build -v -o server ./doh-server
43 install -Dm755 client "$pkgdir"/usr/bin/doh-client
44 install -Dm644 doh-client/doh-client.conf -t "$pkgdir"/etc/dns-over-https/
45 install -Dm644 systemd/doh-client.service -t "$pkgdir"/usr/lib/systemd/system/
46 install -Dm755 NetworkManager/dispatcher.d/doh-client -t "$pkgdir"/etc/NetworkManager/dispatcher.d/
48 install -Dm755 server "$pkgdir"/usr/bin/doh-server
49 install -Dm644 doh-server/doh-server.conf -t "$pkgdir"/etc/dns-over-https/
50 install -Dm644 systemd/doh-server.service -t "$pkgdir"/usr/lib/systemd/system/
51 install -Dm755 NetworkManager/dispatcher.d/doh-server -t "$pkgdir"/etc/NetworkManager/dispatcher.d/
53 install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/