# Maintainer: Steve Holweg # Contributor: Baptiste Jonglez pkgname=kea pkgver=1.4.0 pkgrel=2 pkgdesc="High-performance, extensible DHCP server engine from ISC, supporting both DHCPv4 and DHCPv6" arch="all" url="http://kea.isc.org" license="MPL2" depends="" makedepends="botan-dev log4cplus-dev boost-dev postgresql-dev mariadb-dev" subpackages="$pkgname-doc $pkgname-dev $pkgname-admin:admin:noarch $pkgname-ctrl-agent:ctrlagent $pkgname-dhcp-ddns:dhcpddns $pkgname-dhcp4 $pkgname-dhcp6 $pkgname-keactrl:keactrl:noarch $pkgname-utils" source="https://ftp.isc.org/isc/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz fix-scripts-include-path.patch kea-dhcp4.initd kea-dhcp6.initd kea-dhcp-ddns.initd kea-ctrl-agent.initd" validpgpkeys="BE0E9748B718253A28BB89FFF1B11BF05CF02E57" # Internet Systems Consortium, Inc. (Signing key, 2017-2018) build() { # Complete build for dev and doc cd "$builddir" ./configure \ --with-mysql \ --with-pgsql \ --prefix=/usr \ --libexecdir=/usr/lib \ --sysconfdir=/etc \ --localstatedir=/var \ --build=$CBUILD \ --host=$CHOST make } check() { cd "$builddir" # Disabled, databases are required for the test to pass #make check ./src/bin/dhcp4/kea-dhcp4 -v } package() { cd "$builddir" make DESTDIR="${pkgdir}" install } _common_sub() { depends="${pkgname}" } admin() { _common_sub pkgdesc="$pkgdesc (Databases administration tools)" mkdir -p "${subpkgdir}/usr/sbin/" mv "${pkgdir}/usr/sbin/kea-admin" "${subpkgdir}/usr/sbin/kea-admin" mkdir -p "${subpkgdir}"/usr/share mv "${pkgdir}/usr/share/kea/" "${subpkgdir}/usr/share" } ctrlagent() { _common_sub mkdir -p "${subpkgdir}"/usr/sbin mv "${pkgdir}/usr/sbin/kea-ctrl-agent" "${subpkgdir}/usr/sbin/kea-ctrl-agent" mkdir -p "${subpkgdir}/etc/kea" mv "${pkgdir}/etc/kea/kea-ctrl-agent.conf" "${subpkgdir}/etc/kea/kea-ctrl-agent.conf" install -Dm755 "${srcdir}/kea-ctrl-agent.initd" "${subpkgdir}/etc/init.d/kea-ctrl-agent.initd" } dhcpddns() { _common_sub pkgdesc="$pkgdesc (DDNS Server)" mkdir -p ${subpkgdir}/usr/sbin/ mv "${pkgdir}/usr/sbin/kea-dhcp-ddns" "${subpkgdir}/usr/sbin/kea-dhcp-ddns" mkdir -p ${subpkgdir}/etc/kea/ mv "${pkgdir}/etc/kea/kea-dhcp-ddns.conf" "${subpkgdir}/etc/kea/kea-dhcp-ddns.conf" install -Dm755 "${srcdir}/kea-dhcp-ddns.initd" "${subpkgdir}/etc/init.d/kea-dhcp-ddns.initd" } dhcp4() { _common_sub pkgdesc="$pkgdesc (DHCP4 Server)" mkdir -p "${subpkgdir}/usr/sbin/" mv "${pkgdir}/usr/sbin/kea-dhcp4" "${subpkgdir}/usr/sbin/kea-dhcp4" mkdir -p "${subpkgdir}/etc/kea/" mv "${pkgdir}/etc/kea/kea-dhcp4.conf" "${subpkgdir}/etc/kea/kea-dhcp4.conf" install -Dm755 "${srcdir}/kea-dhcp4.initd" "${subpkgdir}/etc/init.d/kea-dhcp4.initd" } dhcp6() { _common_sub pkgdesc="$pkgdesc (DHCP6 Server)" mkdir -p ${subpkgdir}/usr/sbin/ mv ${pkgdir}/usr/sbin/kea-dhcp6 ${subpkgdir}/usr/sbin/kea-dhcp6 mkdir -p ${subpkgdir}/etc/kea/ mv ${pkgdir}/etc/kea/kea-dhcp6.conf ${subpkgdir}/etc/kea/kea-dhcp6.conf install -Dm755 "${srcdir}"/kea-dhcp6.initd "${subpkgdir}"/etc/init.d/kea-dhcp6.initd } keactrl() { _common_sub pkgdesc="$pkgdesc (Kea process manager)" mkdir -p "${subpkgdir}/usr/sbin/" mv "${pkgdir}/usr/sbin/keactrl" "${subpkgdir}/usr/sbin/keactrl" mkdir -p "${subpkgdir}/etc/kea/" mv "${pkgdir}/etc/kea/keactrl.conf" "${subpkgdir}/etc/kea/keactrl.conf" } utils() { _common_sub pkgdesc="$pkgdesc (Optional Utils)" mkdir -p "${subpkgdir}/usr/sbin/" mv "${pkgdir}/usr/sbin/perfdhcp" "${subpkgdir}/usr/sbin/perfdhcp" mv "${pkgdir}/usr/sbin/kea-lfc" "${subpkgdir}/usr/sbin/kea-lfc" mkdir -p "${subpkgdir}/usr/bin/" mv "${pkgdir}/usr/bin/kea-msg-compiler" "${subpkgdir}/usr/bin/kea-msg-compiler" } sha512sums="ce4e2bcdc6f06472c4dccfc9cc26b06ff10ce1ce947b2bdc8753bbb15ff77831f7317625bdd81d24c945cf0d4c33cf9eef0ae0be21149532b0b9b9bc8892dd14 kea-1.4.0.tar.gz 293d523b59de8531ae0ecc1be863d9c47b940eb32017f769b212150250c86672bc0473b096eaa07ad6b682259b754a2f387a6ff2abec14a2fb8968f34585b0d5 fix-scripts-include-path.patch 9165141380f723c641411d1394cdeeeac8cf72321012ba0aafa36b64ec171eba996ed6bd1f5460523f7c4b32cb37b368331984bcd19ca82d9c63211fdbb0a36e kea-dhcp4.initd 6e7608d2133758bfc80828ef6a072127f25ac9d47cf16c1ca91eca1e5ee8c96a5a7d0e515725a8d9556205e6e70113177b6f7e5c4306385de6266aa5c09ea2d7 kea-dhcp6.initd 31705accecc50a50c7a01ba700acdc68fb10f776bb583e1c1ae78fb33f8ba9cc66f7e12686f057d9d534a26ca09cbe7879399ee31463b46a78d9f203524357af kea-dhcp-ddns.initd d6b0e14b055abd3aae7f74ea4d32ebb74ffcf87c35f1d3a52407e37574b45262bb0084b1b20f2f08c5bf7388ba23a503689eae6fc90d9096f7f1f6656999bf41 kea-ctrl-agent.initd"