forked from jgp19684u/frabjous
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dnscrypt-wrapper-9999.ebuild
49 lines (36 loc) · 1 KB
/
dnscrypt-wrapper-9999.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit git-r3 systemd user
DESCRIPTION="A server-side DNSCrypt proxy"
HOMEPAGE="https://github.com/cofyc/dnscrypt-wrapper"
EGIT_REPO_URI="https://github.com/cofyc/${PN}.git"
LICENSE="BSD"
SLOT="0"
KEYWORDS=""
IUSE="examples"
DEPEND="dev-libs/libsodium[-minimal]
>=dev-libs/libevent-2.1.5"
RDEPEND="${DEPEND}"
DOCS=( README.md )
pkg_setup() {
enewgroup dnscrypt
enewuser dnscrypt -1 -1 /var/empty dnscrypt
}
src_install() {
emake PREFIX="${EPREFIX}/usr" \
DESTDIR="${D}" install
diropts -o dnscrypt -g dnscrypt -m750
dodir /etc/dnscrypt-wrapper
newinitd "${FILESDIR}"/${PN}.initd-r3 ${PN}
newconfd "${FILESDIR}"/${PN}.confd-r2 ${PN}
systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
insinto /etc/default
newins "${FILESDIR}"/${PN}.confd-r2 ${PN}
einstalldocs
if use examples; then
docinto examples
dodoc -r example/*
docompress -x /usr/share/doc/${PF}/examples
fi
}