1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Felix Yan <felixonmars@archlinux.org>
3 # Contributor: Techlive Zheng <techlivezheng at gmail dot com>
4 # Contributor: peace4all <markspost at rocketmail dot com>
8 _commit=8e043f435d919912e46ac9b7d2beddcfdc8aab70 # refs/tags/2.1.4
10 pkgdesc="A flexible DNS proxy, with support for encrypted DNS protocols"
12 url="https://github.com/DNSCrypt/dnscrypt-proxy"
16 optdepends=('python-urllib3: for generate-domains-blocklist')
18 etc/$pkgname/$pkgname.toml
19 etc/$pkgname/allowed-ips.txt
20 etc/$pkgname/allowed-names.txt
21 etc/$pkgname/blocked-ips.txt
22 etc/$pkgname/blocked-names.txt
23 etc/$pkgname/cloaking-rules.txt
24 etc/$pkgname/forwarding-rules.txt
26 # NOTE: disabled until gcc is fixed to produce reproducible bytecode for go
29 git+https://github.com/dnscrypt/$pkgname#tag=$_commit?signed
32 $pkgname-$pkgver-configuration.patch::https://github.com/dvzrv/dnscrypt-proxy/commit/0dfd620f36c6d5e411933299d8a1481c67da827b.patch
35 '6dd1ad7946c8903e0b91658a3680d5cd8d89e8c2177d23ad97b166312fbab649a22599542c94612dec46329e3bba3a55d1488b5228705a85c38565b7dfea54a5'
36 '56a56e87032da9316b392b0613124b0743673041596c717005541ae9b3994c7fc16c02497ea773d321f45d8e0f9ea8fda00783062cef4d5c8277b5b6f7cb10d5'
37 '6a28226fae15490115a88e93032f8eb09203f7b2d5b89104e1cc8066eaf72b1bc759d6f8a780a0eca2dc1e0db7deae4798c913d500a86105aff2d48759c154bc')
38 validpgpkeys=('54A2B8892CC3D6A597B92B6C210627AABA709FE1') # Frank Denis (Jedi/Sector One) <pgp@pureftpd.org
42 patch -Np1 -i ../$pkgname-$pkgver-configuration.patch
47 export CGO_CPPFLAGS="$CPPFLAGS"
48 export CGO_CFLAGS="$CFLAGS"
49 export CGO_CXXFLAGS="$CXXFLAGS"
50 export CGO_LDFLAGS="$LDFLAGS"
51 export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
60 install -vDm 755 $pkgname/$pkgname -t "$pkgdir/usr/bin/"
62 install -vDm 644 $pkgname/example-$pkgname.toml "$pkgdir/etc/$pkgname/$pkgname.toml"
63 for _config in {{allowed,blocked}-{ips,names},{cloaking,forwarding}-rules,captive-portals}.txt; do
64 install -vDm 644 $pkgname/example-$_config "$pkgdir/etc/$pkgname/$_config"
67 install -vDm 644 utils/generate-domains-blocklist/*.{conf,txt} -t "$pkgdir/usr/share/$pkgname/utils/generate-domains-blocklist"
68 install -vDm 755 utils/generate-domains-blocklist/generate-domains-blocklist.py "$pkgdir/usr/bin/generate-domains-blocklist"
69 # systemd service/socket
70 install -vDm 644 ../$pkgname.{service,socket} -t "$pkgdir/usr/lib/systemd/system/"
72 install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
74 install -vDm 644 {ChangeLog,README.md} -t "$pkgdir/usr/share/doc/$pkgname"
76 # vim:set ts=2 sw=2 et: