commit:     fd1fe80c2341377488a95308aae8768b89c8d7dc
Author:     Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
AuthorDate: Wed Sep 27 11:09:40 2023 +0000
Commit:     Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
CommitDate: Sat Sep 30 10:54:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd1fe80c

net-misc/kea: add 2.4.0

Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
Closes: https://github.com/gentoo/gentoo/pull/33087
Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>

 net-misc/kea/Manifest         |   1 +
 net-misc/kea/kea-2.4.0.ebuild | 140 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 141 insertions(+)

diff --git a/net-misc/kea/Manifest b/net-misc/kea/Manifest
index 08665ba991a5..a29210d24713 100644
--- a/net-misc/kea/Manifest
+++ b/net-misc/kea/Manifest
@@ -1,2 +1,3 @@
 DIST kea-2.0.2.tar.gz 9796557 BLAKE2B 
a859c4cc3f6686db2dcf640738b421499a816700d134ee9322290051c3a192bab482be4a4bdb2630113594a3af1cafe2b95abce4a463815a6404fe87fac227ad
 SHA512 
edb7de227898fb7bd76dd8b503d02e07b4ba512b907b53399a5c45bd216820b342f00c1834858848ce8ff94aa3c228ceead0e2946cbcb1f75a03ca579630be83
 DIST kea-2.2.0.tar.gz 9999074 BLAKE2B 
10b4bca1a135c6d146490f8c4c7bd4d56c1c03e2b4cc88a6888fcad5d1a5c2ee2d2c0215cb345b53a2a4262dbd02516d75d5778835d45384a7d69a062b8696b9
 SHA512 
82cd44efea8c968ef097de242e1ca59e0183c80df25050017fd45538d35da64a9a0d2f4a5249ad3bd3d30b1f8895c360d301518bc22e60dfddd966fe020dc773
+DIST kea-2.4.0.tar.gz 10462721 BLAKE2B 
07a4424c01872142b85446ee881afbdc9d8b3a0bc7879226463dd0ba20eba6d3d6db3dfd5fff88cd54af05c4f58183032c7df90d24a969a7ae63200822b6f35f
 SHA512 
b0bdb6b6af88e322145ffeb742a818d6e225846ff981ecc4925d311870db94e0c5a4eb0e1140f146624f64b636c9b24148b5efbc32e62a19b99bba0810b54654

diff --git a/net-misc/kea/kea-2.4.0.ebuild b/net-misc/kea/kea-2.4.0.ebuild
new file mode 100644
index 000000000000..bf1c596ab6ba
--- /dev/null
+++ b/net-misc/kea/kea-2.4.0.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PV="${PV//_p/-P}"
+MY_PV="${MY_PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="High-performance production grade DHCPv4 & DHCPv6 server"
+HOMEPAGE="https://www.isc.org/kea/";
+
+PYTHON_COMPAT=( python3_{8..12} )
+
+inherit autotools fcaps python-single-r1 systemd tmpfiles
+
+if [[ ${PV} = 9999* ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://gitlab.isc.org/isc-projects/kea.git";
+else
+       SRC_URI="ftp://ftp.isc.org/isc/kea/${MY_P}.tar.gz
+               ftp://ftp.isc.org/isc/kea/${MY_PV}/${MY_P}.tar.gz";
+       # odd minor version = development release
+       if [[ $(( $(ver_cut 2) % 2 )) -ne 1 ]] ; then
+               if ! [[ "${PV}" == *_beta* || "${PV}" == *_rc* ]] ; then
+                        KEYWORDS="~amd64 ~arm64 ~x86"
+               fi
+       fi
+fi
+
+LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script
+SLOT="0"
+IUSE="debug doc mysql +openssl postgres +samples shell test"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+       dev-libs/boost:=
+       dev-libs/log4cplus
+       doc? (
+               $(python_gen_cond_dep '
+                       dev-python/sphinx[${PYTHON_USEDEP}]
+                       dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
+               ')
+       )
+       mysql? ( dev-db/mysql-connector-c )
+       !openssl? ( dev-libs/botan:2= )
+       openssl? ( dev-libs/openssl:0= )
+       postgres? ( dev-db/postgresql:* )
+       shell? ( ${PYTHON_DEPS} )
+"
+DEPEND="${COMMON_DEPEND}
+       test? ( dev-cpp/gtest )
+"
+RDEPEND="${COMMON_DEPEND}
+       acct-group/dhcp
+       acct-user/dhcp"
+BDEPEND="virtual/pkgconfig"
+
+REQUIRED_USE="shell? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.2.0-openssl-version.patch
+)
+
+pkg_setup() {
+       use shell && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+       default
+
+       cp "${FILESDIR}"/ax_gtest.m4 "${S}"/m4macros/ax_gtest.m4 || die 
'Replace gtest m4 macro failed'
+
+       # brand the version with Gentoo
+       sed -i \
+               -e "s/AC_INIT(kea,${PV}.*, 
[email protected])/AC_INIT([kea], [${PVR}-gentoo], 
[[email protected]])/g" \
+               configure.ac || die
+
+       sed -i \
+               -e '/mkdir -p $(DESTDIR)${runstatedir}\/${PACKAGE_NAME}/d' \
+               Makefile.am || die "Fixing Makefile.am failed"
+
+       eautoreconf
+}
+
+src_configure() {
+       local myeconfargs=(
+               --disable-install-configurations
+               --disable-rpath
+               --disable-static
+               --enable-generate-messages
+               --enable-perfdhcp
+               --localstatedir="${EPREFIX}/var"
+               --runstatedir="${EPREFIX}/run"
+               --without-werror
+               --with-log4cplus
+               $(use_enable debug)
+               $(use_enable doc generate-docs)
+               $(use_enable test gtest)
+               $(use_enable shell)
+               $(use_with mysql)
+               $(use_with openssl)
+               $(use_with postgres pgsql)
+       )
+       econf "${myeconfargs[@]}"
+}
+
+src_install() {
+       default
+       newconfd "${FILESDIR}"/${PN}-confd-r1 ${PN}
+       newinitd "${FILESDIR}"/${PN}-initd-r1 ${PN}
+
+       if use samples; then
+               diropts -m 0750 -o root -g dhcp
+               dodir /etc/kea
+               insopts -m 0640 -o root -g dhcp
+               insinto /etc/kea
+               doins "${FILESDIR}"/${PN}-ctrl-agent.conf
+               doins "${FILESDIR}"/${PN}-ddns-server.conf
+               doins "${FILESDIR}"/${PN}-dhcp4.conf
+               doins "${FILESDIR}"/${PN}-dhcp6.conf
+       fi
+
+       systemd_dounit "${FILESDIR}"/${PN}-ctrl-agent.service
+       systemd_dounit "${FILESDIR}"/${PN}-ddns-server.service
+       systemd_dounit "${FILESDIR}"/${PN}-dhcp4-server.service
+       systemd_dounit "${FILESDIR}"/${PN}-dhcp6-server.service
+
+       newtmpfiles "${FILESDIR}"/${PN}.tmpfiles.conf ${PN}.conf
+
+       keepdir /var/lib/${PN} /var/log/${PN}
+       find "${ED}" -type f -name "*.la" -delete || die
+}
+
+pkg_postinst() {
+       tmpfiles_process ${PN}.conf
+       fcaps cap_net_bind_service,cap_net_raw=+ep /usr/sbin/kea-dhcp{4,6}
+}

Reply via email to