summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/etcd/etcd-3.3.1.ebuild37
-rw-r--r--dev-db/etcd/metadata.xml3
2 files changed, 23 insertions, 17 deletions
diff --git a/dev-db/etcd/etcd-3.3.1.ebuild b/dev-db/etcd/etcd-3.3.1.ebuild
index b1406dc1a18b..7ec5b9eda5c9 100644
--- a/dev-db/etcd/etcd-3.3.1.ebuild
+++ b/dev-db/etcd/etcd-3.3.1.ebuild
@@ -13,7 +13,7 @@ HOMEPAGE="https://github.com/coreos/etcd"
SRC_URI="https://${EGO_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
-IUSE="doc"
+IUSE="doc +server"
DEPEND=">=dev-lang/go-1.9:="
RDEPEND="!dev-db/etcdctl"
@@ -37,23 +37,26 @@ src_compile() {
src_install() {
pushd src/${EGO_PN} || die
- insinto /etc/${PN}
- doins "${FILESDIR}/${PN}.conf"
- dobin bin/*
- dodoc README.md
+ dobin bin/etcdctl
use doc && dodoc -r Documentation
- systemd_dounit "${FILESDIR}/${PN}.service"
- systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf
- newinitd "${FILESDIR}"/${PN}.initd ${PN}
- newconfd "${FILESDIR}"/${PN}.confd ${PN}
- insinto /etc/logrotate.d
- newins "${FILESDIR}/${PN}.logrotated" "${PN}"
- keepdir /var/lib/${PN}
- fowners ${PN}:${PN} /var/lib/${PN}
- fperms 0700 /var/lib/${PN}
- keepdir /var/log/${PN}
- fowners ${PN}:${PN} /var/log/${PN}
- fperms 755 /var/log/${PN}
+ if use server; then
+ insinto /etc/${PN}
+ doins "${FILESDIR}/${PN}.conf"
+ dobin bin/etcd
+ dodoc README.md
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ keepdir /var/lib/${PN}
+ fowners ${PN}:${PN} /var/lib/${PN}
+ fperms 0700 /var/lib/${PN}
+ keepdir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ fperms 755 /var/log/${PN}
+ fi
popd || die
}
diff --git a/dev-db/etcd/metadata.xml b/dev-db/etcd/metadata.xml
index c07ccbfad9c4..f48ad8fcc96f 100644
--- a/dev-db/etcd/metadata.xml
+++ b/dev-db/etcd/metadata.xml
@@ -7,6 +7,9 @@
<doc>https://github.com/coreos/etcd/blob/master/README.md/</doc>
<remote-id type="github">coreos/etcd</remote-id>
</upstream>
+ <use>
+ <flag name="server">Installs etcd daemon</flag>
+ </use>
<maintainer type="person">
<email>zmedico@gentoo.org</email>
</maintainer>