1 |
commit: 7d2e52b7ec550cfd2a19a1639abea4a9b765e392 |
2 |
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 23 16:30:29 2018 +0000 |
4 |
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 23 16:30:50 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d2e52b7 |
7 |
|
8 |
dev-db/etcd: Add support to only install etcdctl |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
dev-db/etcd/etcd-3.3.1.ebuild | 37 ++++++++++++++++++++----------------- |
13 |
dev-db/etcd/metadata.xml | 3 +++ |
14 |
2 files changed, 23 insertions(+), 17 deletions(-) |
15 |
|
16 |
diff --git a/dev-db/etcd/etcd-3.3.1.ebuild b/dev-db/etcd/etcd-3.3.1.ebuild |
17 |
index b1406dc1a18..7ec5b9eda5c 100644 |
18 |
--- a/dev-db/etcd/etcd-3.3.1.ebuild |
19 |
+++ b/dev-db/etcd/etcd-3.3.1.ebuild |
20 |
@@ -13,7 +13,7 @@ HOMEPAGE="https://github.com/coreos/etcd" |
21 |
SRC_URI="https://${EGO_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" |
22 |
LICENSE="Apache-2.0" |
23 |
SLOT="0" |
24 |
-IUSE="doc" |
25 |
+IUSE="doc +server" |
26 |
DEPEND=">=dev-lang/go-1.9:=" |
27 |
RDEPEND="!dev-db/etcdctl" |
28 |
|
29 |
@@ -37,23 +37,26 @@ src_compile() { |
30 |
|
31 |
src_install() { |
32 |
pushd src/${EGO_PN} || die |
33 |
- insinto /etc/${PN} |
34 |
- doins "${FILESDIR}/${PN}.conf" |
35 |
- dobin bin/* |
36 |
- dodoc README.md |
37 |
+ dobin bin/etcdctl |
38 |
use doc && dodoc -r Documentation |
39 |
- systemd_dounit "${FILESDIR}/${PN}.service" |
40 |
- systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf |
41 |
- newinitd "${FILESDIR}"/${PN}.initd ${PN} |
42 |
- newconfd "${FILESDIR}"/${PN}.confd ${PN} |
43 |
- insinto /etc/logrotate.d |
44 |
- newins "${FILESDIR}/${PN}.logrotated" "${PN}" |
45 |
- keepdir /var/lib/${PN} |
46 |
- fowners ${PN}:${PN} /var/lib/${PN} |
47 |
- fperms 0700 /var/lib/${PN} |
48 |
- keepdir /var/log/${PN} |
49 |
- fowners ${PN}:${PN} /var/log/${PN} |
50 |
- fperms 755 /var/log/${PN} |
51 |
+ if use server; then |
52 |
+ insinto /etc/${PN} |
53 |
+ doins "${FILESDIR}/${PN}.conf" |
54 |
+ dobin bin/etcd |
55 |
+ dodoc README.md |
56 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
57 |
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf |
58 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
59 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
60 |
+ insinto /etc/logrotate.d |
61 |
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}" |
62 |
+ keepdir /var/lib/${PN} |
63 |
+ fowners ${PN}:${PN} /var/lib/${PN} |
64 |
+ fperms 0700 /var/lib/${PN} |
65 |
+ keepdir /var/log/${PN} |
66 |
+ fowners ${PN}:${PN} /var/log/${PN} |
67 |
+ fperms 755 /var/log/${PN} |
68 |
+ fi |
69 |
popd || die |
70 |
} |
71 |
|
72 |
|
73 |
diff --git a/dev-db/etcd/metadata.xml b/dev-db/etcd/metadata.xml |
74 |
index c07ccbfad9c..f48ad8fcc96 100644 |
75 |
--- a/dev-db/etcd/metadata.xml |
76 |
+++ b/dev-db/etcd/metadata.xml |
77 |
@@ -7,6 +7,9 @@ |
78 |
<doc>https://github.com/coreos/etcd/blob/master/README.md/</doc> |
79 |
<remote-id type="github">coreos/etcd</remote-id> |
80 |
</upstream> |
81 |
+ <use> |
82 |
+ <flag name="server">Installs etcd daemon</flag> |
83 |
+ </use> |
84 |
<maintainer type="person"> |
85 |
<email>zmedico@g.o</email> |
86 |
</maintainer> |