# Maintainer: Alexey Pavlov _realname=unbound pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.24.2 pkgrel=2 pkgdesc="Validating, recursive, and caching DNS resolver (mingw-w64)" arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') url='https://unbound.net/' msys2_repository_url='https://github.com/NLnetLabs/unbound' msys2_references=( "archlinux: unbound" "cpe: cpe:/a:nlnetlabs:unbound" "cpe: cpe:/a:unbound:unbound" "gentoo: net-dns/unbound" ) license=('spdx:BSD-3-Clause') makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-autotools" "bison" "flex") depends=("${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-expat" #"${MINGW_PACKAGE_PREFIX}-libevent" "${MINGW_PACKAGE_PREFIX}-ldns") source=("https://unbound.net/downloads/${_realname}-${pkgver}.tar.gz"{,.asc} 'manifest') sha256sums=('44e7b53e008a6dcaec03032769a212b46ab5c23c105284aa05a4f3af78e59cdb' 'SKIP' '838098b25a8044176b3139b4003594570c62a8d64f5470fbbd769f3bf44e0855') # See https://nlnetlabs.nl/people/ for keys. validpgpkeys=('EDFAA3F2CA4E6EB05681AF8E9F6F1C2D7E045F8D' # W.C.A. Wijngaards '948EB42322C5D00B79340F5DCFF3344D9087A490' # Yorgos Thessalonikefs ' ) prepare() { cd "${srcdir}"/${_realname}-${pkgver} } build() { mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}" cp -f "${srcdir}"/manifest anchor-update.exe.manifest ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --enable-shared \ --enable-static \ --sysconfdir=${MINGW_PREFIX}/etc \ --localstatedir=${MINGW_PREFIX}/var \ --sbindir=${MINGW_PREFIX}/bin \ --disable-rpath \ --with-libevent=no \ --with-libexpat=${MINGW_PREFIX} \ --with-conf-file=${MINGW_PREFIX}/etc/unbound/unbound.conf \ --without-pyunbound \ --without-pythonmodule \ --with-ssl=${MINGW_PREFIX} make } check() { cd "${srcdir}/build-${MSYSTEM}" make test || true } package() { cd "${srcdir}/build-${MSYSTEM}" make -j1 DESTDIR="$pkgdir" install install -Dm644 "${srcdir}"/${_realname}-${pkgver}/doc/example.conf.in "${pkgdir}${MINGW_PREFIX}/etc/unbound/unbound.conf.example" install -Dm644 "${srcdir}"/${_realname}-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" for ff in anchor-update unbound-service-install unbound-service-remove; do install -Dm755 ${ff}.exe "${pkgdir}${MINGW_PREFIX}/bin/" install -Dm644 "${srcdir}"/manifest "${pkgdir}"${MINGW_PREFIX}/bin/${ff}.exe.manifest done }