# Contributor: Ian Bashford # Maintainer: Ian Bashford pkgname=dnscrypt-proxy pkgver=2.1.4 pkgrel=6 pkgdesc="Tool for securing communications between a client and a DNS resolver" url="https://dnscrypt.info" arch="all" license="ISC" depends="ca-certificates" makedepends="go" install="$pkgname.pre-install" pkgusers=dnscrypt pkggroups=dnscrypt subpackages="$pkgname-setup::noarch $pkgname-doc $pkgname-openrc" source="$pkgname-$pkgver.tar.gz::https://github.com/DNSCrypt/dnscrypt-proxy/archive/$pkgver.tar.gz $pkgname.initd $pkgname.confd $pkgname.setup dnscrypt-proxy.toml " options="!check" builddir="$srcdir/dnscrypt-proxy-$pkgver/dnscrypt-proxy" export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { go build } package() { install -d -o $pkgusers -g $pkggroups -m 755 "$pkgdir"/etc/$pkgname install -d -o $pkgusers -g $pkggroups -m 755 "$pkgdir"/usr/share/$pkgname install -d -o $pkgusers -g $pkggroups -m 755 "$pkgdir"/var/cache/$pkgname install -d -o $pkgusers -g $pkggroups -m 755 "$pkgdir"/var/log/$pkgname install -m755 -D dnscrypt-proxy "$pkgdir"/usr/bin/dnscrypt-proxy install -Dm 644 "$srcdir"/dnscrypt-proxy.toml "$pkgdir"/etc/$pkgname/dnscrypt-proxy.toml install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname for i in example-*; do install -m644 -D "$i" -t "$pkgdir"/usr/share/doc/$pkgname/ done } setup() { pkgdesc="Script for setting up dnscrypt proxy" depends="sed wget $pkgname=$pkgver-r$pkgrel" install -m755 -D "$srcdir"/$pkgname.setup "$subpkgdir"/usr/sbin/setup-dnscrypt } sha512sums=" 4540d11432c4f35244b79f66b8926f8a1025e09010d8d313f0cd0d62e3fafcbd12bd24e9956ddf9cd8c1ec8aae997b031ab08dae4ee220bf31f33227ec6c07ca dnscrypt-proxy-2.1.4.tar.gz a1bbcc63d3160e2101096cb06d714422ee85f7cf86a856b53437abb04f23995ac75b2a9d980c6c8e790bd5db350f1e2d6d39093705b0657020323179e5ff2076 dnscrypt-proxy.initd c001ae39da1b2db71764cab568f9ed18e4de0cea3d1a4e7bd6dd01a5668b81a888ea9eef99de6beac08857ad7f8eb1a32d730e946ac3563e4dcfa27147e35052 dnscrypt-proxy.confd 1c2bd450b1d195bd11d3441017f269904b3eb8ee8ace419f11882679664840b47d32e20c56d190b06dc5d9bb4dea0bfadbc878dcb1272af391b225bae56ad1e7 dnscrypt-proxy.setup b8974f481d4442db1891037b993f760c22e10143cc047bda81458e6806cb2629211c8aaca2a71aa91976dfd559754841a70ba169acef6c857b2f2cc996346c29 dnscrypt-proxy.toml "