| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
| 6 |
|
PATCHSET=kea-3.0.2-patchset
|
| 7 |
|
PYTHON_COMPAT=( python3_{11..14} )
|
|
6 |
PYTHON_COMPAT=( python3_{11..15} )
|
| 8 |
7 |
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/isc.asc
|
| 9 |
8 |
inherit eapi9-ver flag-o-matic meson python-r1 systemd tmpfiles
|
| 10 |
9 |
inherit toolchain-funcs verify-sig
|
| ... | ... | |
| 20 |
19 |
https://downloads.isc.org/isc/kea/${PV}/${P}.tar.xz
|
| 21 |
20 |
!doc? ( https://codeberg.org/peter1010/kea-manpages/archive/kea-manpages-${PV}.tar.gz )
|
| 22 |
21 |
verify-sig? ( https://downloads.isc.org/isc/kea/${PV}/${P}.tar.xz.asc )
|
| 23 |
|
https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}.tar.xz
|
| 24 |
22 |
"
|
| 25 |
23 |
KEYWORDS="amd64 arm arm64 ~x86"
|
| 26 |
24 |
fi
|
| ... | ... | |
| 33 |
31 |
RESTRICT="!test? ( test )"
|
| 34 |
32 |
|
| 35 |
33 |
COMMON_DEPEND="
|
| 36 |
|
>=dev-libs/boost-1.69:=
|
|
34 |
>=dev-libs/boost-1.66:=
|
| 37 |
35 |
dev-libs/log4cplus:=
|
| 38 |
36 |
kerberos? ( virtual/krb5 )
|
| 39 |
37 |
mysql? (
|
| ... | ... | |
| 68 |
66 |
verify-sig? ( sec-keys/openpgp-keys-isc )
|
| 69 |
67 |
"
|
| 70 |
68 |
|
| 71 |
|
PATCHES=( "${WORKDIR}"/${PATCHSET} )
|
| 72 |
|
|
| 73 |
69 |
python_check_deps() {
|
| 74 |
|
use doc || return 0;
|
|
70 |
use doc || return 0
|
| 75 |
71 |
python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" \
|
| 76 |
72 |
"dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]"
|
| 77 |
73 |
}
|
| 78 |
74 |
|
| 79 |
75 |
pkg_setup() {
|
| 80 |
|
python_setup
|
|
76 |
[[ ${MERGE_TYPE} != binary ]] && python_setup
|
| 81 |
77 |
}
|
| 82 |
78 |
|
| 83 |
79 |
src_unpack() {
|
| 84 |
|
if [[ ${PV} == 9999 ]] ; then
|
|
80 |
if [[ ${PV} == 9999 ]]; then
|
| 85 |
81 |
git-r3_src_unpack
|
| 86 |
82 |
return
|
| 87 |
83 |
fi
|
| ... | ... | |
| 117 |
113 |
-i src/bin/shell/meson.build || die
|
| 118 |
114 |
|
| 119 |
115 |
# do not create /run
|
| 120 |
|
sed -e '/^install_emptydir(RUNSTATEDIR)$/d' \
|
|
116 |
sed -e '/^install_emptydir(RUNSTATEDIR/d' \
|
| 121 |
117 |
-i meson.build || die
|
| 122 |
118 |
}
|
| 123 |
119 |
|
| ... | ... | |
| 125 |
121 |
# https://bugs.gentoo.org/861617
|
| 126 |
122 |
# https://gitlab.isc.org/isc-projects/kea/-/issues/3946
|
| 127 |
123 |
#
|
| 128 |
|
# Kea Devs say no to LTO
|
|
124 |
# Upstream does not support LTO
|
| 129 |
125 |
filter-lto
|
| 130 |
126 |
|
| 131 |
127 |
if use !openssl; then
|
| ... | ... | |
| 183 |
179 |
EMESON_SKIP_TESTS+=(
|
| 184 |
180 |
kea-mysql-tests
|
| 185 |
181 |
dhcp-mysql-lib-tests
|
| 186 |
|
dhcp-forensic-log-libloadtests
|
|
182 |
dhcp-forensic-log-libload-tests
|
| 187 |
183 |
)
|
| 188 |
184 |
fi
|
| 189 |
185 |
|
| ... | ... | |
| 192 |
188 |
EMESON_SKIP_TESTS+=(
|
| 193 |
189 |
kea-pgsql-tests
|
| 194 |
190 |
dhcp-pgsql-lib-tests
|
| 195 |
|
dhcp-forensic-log-libloadtests
|
|
191 |
dhcp-forensic-log-libload-tests
|
| 196 |
192 |
)
|
| 197 |
193 |
fi
|
| 198 |
194 |
|
| ... | ... | |
| 216 |
212 |
}
|
| 217 |
213 |
|
| 218 |
214 |
install_shell() {
|
| 219 |
|
python_domodule ${ORIG_BUILD_DIR}/src/bin/shell/*.py
|
| 220 |
|
python_doscript ${ORIG_BUILD_DIR}/src/bin/shell/kea-shell
|
|
215 |
local orig_build_dir=$1
|
|
216 |
python_domodule "${orig_build_dir}"/src/bin/shell/*.py
|
|
217 |
python_doscript "${orig_build_dir}"/src/bin/shell/kea-shell
|
| 221 |
218 |
|
| 222 |
219 |
# fix path to import kea modules
|
| 223 |
220 |
sed -e "/^sys.path.append/s|(.*)|('$(python_get_sitedir)/${PN}')|" \
|
| ... | ... | |
| 227 |
224 |
src_install() {
|
| 228 |
225 |
meson_install
|
| 229 |
226 |
|
| 230 |
|
# Tidy up
|
| 231 |
|
rm -r "${ED}"/usr/share/kea/meson-info || die
|
|
227 |
# Remove unused database files
|
| 232 |
228 |
if use !mysql; then
|
| 233 |
229 |
rm -r "${ED}"/usr/share/kea/scripts/mysql || die
|
| 234 |
230 |
fi
|
| ... | ... | |
| 245 |
241 |
|
| 246 |
242 |
if use shell; then
|
| 247 |
243 |
python_moduleinto ${PN}
|
| 248 |
|
ORIG_BUILD_DIR=${BUILD_DIR} python_foreach_impl install_shell
|
|
244 |
python_foreach_impl install_shell "${BUILD_DIR}"
|
| 249 |
245 |
fi
|
| 250 |
246 |
|
| 251 |
247 |
# We don't use keactrl.conf so move to reduce confusion
|
| ... | ... | |
| 259 |
255 |
chmod 0640 "${ED}"/etc/${PN}/*.conf || die
|
| 260 |
256 |
|
| 261 |
257 |
# Install a conf per service and a linked init script per service
|
| 262 |
|
newinitd "${FILESDIR}"/${PN}-initd-r4 ${PN}
|
|
258 |
newinitd "${FILESDIR}"/${PN}-initd-r5 ${PN}
|
| 263 |
259 |
local svc
|
| 264 |
|
for svc in dhcp4 dhcp6 dhcp-ddns ctrl-agent; do
|
| 265 |
|
newconfd "${FILESDIR}"/${PN}-confd-r3 kea-${svc}
|
|
260 |
for svc in dhcp4 dhcp6 dhcp-ddns; do
|
|
261 |
newconfd "${FILESDIR}"/${PN}-confd-r4 kea-${svc}
|
| 266 |
262 |
sed -e "s:@KEA_SVC@:${svc}:g" \
|
| 267 |
263 |
-i "${ED}"/etc/conf.d/kea-${svc} || die
|
| 268 |
264 |
dosym kea "${EPREFIX}"/etc/init.d/kea-${svc}
|
| ... | ... | |
| 272 |
268 |
doman "${WORKDIR}"/kea-manpages/man/*
|
| 273 |
269 |
fi
|
| 274 |
270 |
|
| 275 |
|
systemd_newunit "${FILESDIR}"/${PN}-ctrl-agent.service-r2 ${PN}-ctrl-agent.service
|
| 276 |
271 |
systemd_newunit "${FILESDIR}"/${PN}-dhcp-ddns.service-r2 ${PN}-dhcp-ddns.service
|
| 277 |
272 |
systemd_newunit "${FILESDIR}"/${PN}-dhcp4.service-r2 ${PN}-dhcp4.service
|
| 278 |
273 |
systemd_newunit "${FILESDIR}"/${PN}-dhcp6.service-r2 ${PN}-dhcp6.service
|
| ... | ... | |
| 294 |
289 |
ewarn " /etc/kea/kea-dhcp4.conf"
|
| 295 |
290 |
ewarn " /etc/kea/kea-dhcp6.conf"
|
| 296 |
291 |
ewarn " /etc/kea/kea-dhcp-ddns.conf"
|
| 297 |
|
ewarn " /etc/kea/kea-ctrl-agent.conf"
|
| 298 |
292 |
ewarn
|
| 299 |
293 |
ewarn " Daemons are launched by default with the unprivileged user 'dhcp'"
|
| 300 |
294 |
ewarn
|
| ... | ... | |
| 311 |
305 |
ewarn " kea-dhcp4"
|
| 312 |
306 |
ewarn " kea-dhcp6"
|
| 313 |
307 |
ewarn " kea-dhcp-ddns"
|
| 314 |
|
ewarn " kea-ctrl"
|
| 315 |
308 |
ewarn "Please adjust your service startups appropriately"
|
| 316 |
309 |
fi
|
| 317 |
310 |
|