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')
17 source=("$pkgname-$pkgver.tar.gz::https://github.com/m13253/dns-over-https/archive/v$pkgver.tar.gz")
18 sha256sums=('59f651da7353745c4d95160b705c4d4f8381483ad39bba49c484bd085fdc0e2a')
22 sed -i 's/\/local//g' systemd/doh-{client,server}.service
27 export GOFLAGS="-buildmode=pie -trimpath"
28 export CGO_LDFLAGS="${LDFLAGS}"
29 export CGO_CFLAGS="${CFLAGS}"
30 export CGO_CPPFLAGS="${CPPFLAGS}"
31 go build -v -o client ./doh-client
32 go build -v -o server ./doh-server
42 install -Dm755 client "$pkgdir"/usr/bin/doh-client
43 install -Dm644 doh-client/doh-client.conf "$pkgdir"/etc/dns-over-https/doh-client.conf
44 install -Dm644 systemd/doh-client.service "$pkgdir"/usr/lib/systemd/system/doh-client.service
45 install -Dm755 NetworkManager/dispatcher.d/doh-client "$pkgdir"/etc/NetworkManager/dispatcher.d/doh-client
47 install -Dm755 server "$pkgdir"/usr/bin/doh-server
48 install -Dm644 doh-server/doh-server.conf "$pkgdir"/etc/dns-over-https/doh-server.conf
49 install -Dm644 systemd/doh-server.service "$pkgdir"/usr/lib/systemd/system/doh-server.service
50 install -Dm755 NetworkManager/dispatcher.d/doh-server "$pkgdir"/etc/NetworkManager/dispatcher.d/doh-server
52 install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE