From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/kea/, net-misc/kea/files/
Date: Tue, 23 May 2017 12:57:54 +0000 (UTC) [thread overview]
Message-ID: <1495544271.934a6a343e87590f1031ec4d24ff76a042a5555a.polynomial-c@gentoo> (raw)
commit: 934a6a343e87590f1031ec4d24ff76a042a5555a
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue May 23 12:57:37 2017 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue May 23 12:57:51 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=934a6a34
net-misc/kea: Revbump to add an openrc init script.
Permission kindly granted by Chainsaw.
Package-Manager: Portage-2.3.6, Repoman-2.3.2
net-misc/kea/files/kea-confd | 4 ++
net-misc/kea/files/kea-initd | 78 ++++++++++++++++++++++
.../kea/{kea-1.2.0.ebuild => kea-1.2.0-r1.ebuild} | 18 +++--
3 files changed, 93 insertions(+), 7 deletions(-)
diff --git a/net-misc/kea/files/kea-confd b/net-misc/kea/files/kea-confd
new file mode 100644
index 00000000000..568468eb3a1
--- /dev/null
+++ b/net-misc/kea/files/kea-confd
@@ -0,0 +1,4 @@
+# Which services should be taken into account?
+DHCP4="true"
+DHCP6="false"
+DDNS="false"
diff --git a/net-misc/kea/files/kea-initd b/net-misc/kea/files/kea-initd
new file mode 100644
index 00000000000..85fdd56b9ec
--- /dev/null
+++ b/net-misc/kea/files/kea-initd
@@ -0,0 +1,78 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="kea dhcp services"
+
+dhcp4_command="/usr/sbin/kea-dhcp4"
+dhcp6_command="/usr/sbin/kea-dhcp6"
+ddns_command="/usr/sbin/kea-dhcp-ddns"
+config_file="/etc/kea/kea.conf"
+dhcp4_pidfile="/run/kea-dhcp4.pid"
+dhcp6_pidfile="/run/kea-dhcp6.pid"
+ddns_pidfile="/run/kea-ddns.pid"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ if [ ! -f "${config_file}" ] ; then
+ eerror "Please create a ${config_file} config file."
+ return 1
+ fi
+
+ if ${DHCP4:-false} ; then
+ if ! ${dhcp4_command} -t ${config_file} 1>/dev/null 2>/dev/null ; then
+ eerror "Error in config file."
+ return 1
+ fi
+ fi
+ if ${DHCP6:-false} ; then
+ if ! ${dhcp6_command} -t ${config_file} 1>/dev/null 2>/dev/null ; then
+ eerror "Error in config file."
+ return 1
+ fi
+ fi
+ if ${DDNS:-false} ; then
+ if ! ${ddns_command} -t ${config_file} 1>/dev/null 2>/dev/null ; then
+ eerror "Error in config file."
+ return 1
+ fi
+ fi
+}
+
+start() {
+ einfo "Starting kea dhcp services"
+ if ${DHCP4:-false} ; then
+ start-stop-daemon -m -b -p ${dhcp4_pidfile} \
+ -x ${dhcp4_command} -- -c ${config_file} \
+ || return 1
+ fi
+ if ${DHCP6:-false} ; then
+ start-stop-daemon -m -b -p ${dhcp6_pidfile} \
+ -x ${dhcp6_command} -- -c ${config_file} \
+ || return 1
+ fi
+ if ${DDNS:-false} ; then
+ start-stop-daemon -m -b -p ${ddns_pidfile} \
+ -x ${ddns_command} -- -c ${config_file} \
+ || return 1
+ fi
+}
+
+stop() {
+ einfo "Stopping kea dhcp services"
+ if ${DHCP4:-false} ; then
+ start-stop-daemon --stop -p ${dhcp4_pidfile} \
+ || return 1
+ fi
+ if ${DHCP6:-false} ; then
+ start-stop-daemon --stop -p ${dhcp6_pidfile} \
+ || return 1
+ fi
+ if ${DDNS:-false} ; then
+ start-stop-daemon --stop -p ${ddns_pidfile} \
+ || return 1
+ fi
+}
diff --git a/net-misc/kea/kea-1.2.0.ebuild b/net-misc/kea/kea-1.2.0-r1.ebuild
similarity index 75%
rename from net-misc/kea/kea-1.2.0.ebuild
rename to net-misc/kea/kea-1.2.0-r1.ebuild
index 6fd49878587..994aa39c6e4 100644
--- a/net-misc/kea/kea-1.2.0.ebuild
+++ b/net-misc/kea/kea-1.2.0-r1.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI=6
-inherit eutils toolchain-funcs user
+inherit toolchain-funcs user
MY_PV="${PV//_alpha/a}"
MY_PV="${MY_PV//_beta/b}"
@@ -40,16 +40,20 @@ src_prepare() {
}
src_configure() {
- econf \
- $(use_with openssl) \
- $(use_enable samples install-configurations) \
- --disable-static \
+ local myeconfargs=(
+ $(use_with openssl)
+ $(use_enable samples install-configurations)
+ --disable-static
--without-werror
+ )
+ econf "${myeconfargs[@]}"
}
src_install() {
default
- prune_libtool_files --all
+ newconfd "${FILESDIR}"/${PN}-confd ${PN}
+ newinitd "${FILESDIR}"/${PN}-initd ${PN}
+ find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
}
pkg_preinst() {
next reply other threads:[~2017-05-23 12:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 12:57 Lars Wendler [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-11-25 9:26 [gentoo-commits] repo/gentoo:master commit in: net-misc/kea/, net-misc/kea/files/ Lars Wendler
2020-12-17 19:05 Lars Wendler
2021-05-14 0:24 Sam James
2021-08-15 7:28 Lars Wendler
2021-08-15 7:56 Lars Wendler
2022-10-19 4:48 Dennis Lamm
2022-10-19 4:48 Dennis Lamm
2024-01-25 20:31 Dennis Lamm
2024-01-25 20:31 Dennis Lamm
2025-06-12 8:08 Sam James
2025-06-12 8:08 Sam James
2025-08-21 1:02 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1495544271.934a6a343e87590f1031ec4d24ff76a042a5555a.polynomial-c@gentoo \
--to=polynomial-c@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox