summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2019-12-03 11:50:03 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2019-12-03 11:51:42 -0800
commit927bacbab020e1fac03ef9cfdb8c313bb5be0fb3 (patch)
tree35b8e752616bc8687055a650f46cf10bf53a1d8a /net-dns/dnscrypt-proxy
parentnet-dns/dnscrypt-proxy: bump to 2.0.34 (diff)
downloadgentoo-927bacbab020e1fac03ef9cfdb8c313bb5be0fb3.tar.gz
gentoo-927bacbab020e1fac03ef9cfdb8c313bb5be0fb3.tar.bz2
gentoo-927bacbab020e1fac03ef9cfdb8c313bb5be0fb3.zip
net-dns/dnscrypt-proxy: sync live ebuild
Package-Manager: Portage-2.3.79, Repoman-2.3.17 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'net-dns/dnscrypt-proxy')
-rw-r--r--net-dns/dnscrypt-proxy/dnscrypt-proxy-9999.ebuild32
1 files changed, 15 insertions, 17 deletions
diff --git a/net-dns/dnscrypt-proxy/dnscrypt-proxy-9999.ebuild b/net-dns/dnscrypt-proxy/dnscrypt-proxy-9999.ebuild
index 215c07210b28..e3266982fa26 100644
--- a/net-dns/dnscrypt-proxy/dnscrypt-proxy-9999.ebuild
+++ b/net-dns/dnscrypt-proxy/dnscrypt-proxy-9999.ebuild
@@ -5,7 +5,7 @@ EAPI=7
EGO_PN="github.com/jedisct1/${PN}"
-inherit fcaps golang-build systemd
+inherit fcaps go-module systemd
if [[ ${PV} == 9999 ]]; then
inherit git-r3
@@ -22,7 +22,7 @@ LICENSE="Apache-2.0 BSD ISC MIT MPL-2.0"
SLOT="0"
IUSE="pie"
-DEPEND=">=dev-lang/go-1.12"
+BDEPEND=">=dev-lang/go-1.13"
RDEPEND="
acct-group/dnscrypt-proxy
@@ -32,33 +32,30 @@ RDEPEND="
FILECAPS=( cap_net_bind_service+ep usr/bin/dnscrypt-proxy )
PATCHES=( "${FILESDIR}"/config-full-paths-r10.patch )
-src_prepare() {
- default
- # Create directory structure suitable for building
- mkdir -p "src/${EGO_PN%/*}" || die
- # fixes $GOPATH/go.mod exists but should not
- rm go.mod || die
- mv "${PN}" "src/${EGO_PN}" || die
- mv "vendor" "src/${EGO_PN}" || die
-}
-
-src_configure() {
- EGO_BUILD_FLAGS="-buildmode=$(usex pie pie default)"
+src_compile() {
+ pushd "${PN}" >/dev/null || die
+ go build -buildmode="$(usex pie pie default)" || die
+ popd >/dev/null || die
}
src_install() {
+ pushd "${PN}" >/dev/null || die
+
dobin dnscrypt-proxy
insinto /etc/dnscrypt-proxy
- newins "src/${EGO_PN}"/example-dnscrypt-proxy.toml dnscrypt-proxy.toml
- doins "src/${EGO_PN}"/example-{blacklist.txt,whitelist.txt}
- doins "src/${EGO_PN}"/example-{cloaking-rules.txt,forwarding-rules.txt}
+ newins example-dnscrypt-proxy.toml dnscrypt-proxy.toml
+ doins example-{blacklist.txt,whitelist.txt}
+ doins example-{cloaking-rules.txt,forwarding-rules.txt}
+
+ popd >/dev/null || die
insinto /usr/share/dnscrypt-proxy
doins -r "utils/generate-domains-blacklists/."
newinitd "${FILESDIR}"/dnscrypt-proxy.initd-r1 dnscrypt-proxy
newconfd "${FILESDIR}"/dnscrypt-proxy.confd dnscrypt-proxy
+
systemd_newunit "${FILESDIR}"/dnscrypt-proxy.service dnscrypt-proxy.service
systemd_newunit "${FILESDIR}"/dnscrypt-proxy.socket dnscrypt-proxy.socket
@@ -70,6 +67,7 @@ src_install() {
pkg_postinst() {
fcaps_pkg_postinst
+ go-module_pkg_postinst
if ! use filecaps; then
ewarn "'filecaps' USE flag is disabled"