90 lines
2.6 KiB
Bash
90 lines
2.6 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
# Contributor: Nicolas Bats <sl1200mk2@gmail.com>
|
|
# Contributor: Karlson2k (Evgeny Grin) <k2k@narod.ru>
|
|
# Contributor: Marcin Sielski <marcin.sielski@motorolasolutions.com>
|
|
|
|
_realname=libmicrohttpd
|
|
pkgbase=mingw-w64-${_realname}
|
|
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
|
pkgver=1.0.2
|
|
pkgrel=1
|
|
pkgdesc="GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url="https://www.gnu.org/software/libmicrohttpd"
|
|
msys2_references=(
|
|
"cpe: cpe:/a:gnu:libmicrohttpd"
|
|
)
|
|
license=('spdx:LGPL-2.1-or-later')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools"
|
|
"${MINGW_PACKAGE_PREFIX}-cc"
|
|
"${MINGW_PACKAGE_PREFIX}-pkgconf")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-curl")
|
|
depends=("${MINGW_PACKAGE_PREFIX}-gnutls")
|
|
source=("https://ftp.gnu.org/gnu/libmicrohttpd/${_realname}-${pkgver}.tar.gz"{,.sig})
|
|
validpgpkeys=('D8423BCB326C7907033929C7939E6BE1E29FC3CC' # Christian Grothoff <christian@grothoff.org>
|
|
'EA812DBEFA5A7EF17DA8F2C1460A317C3326D2AE') # Karlson2k (Evgeny Grin) <k2k@narod.ru>
|
|
sha256sums=('df324fcd0834175dab07483133902d9774a605bfa298025f69883288fd20a8c7'
|
|
'SKIP')
|
|
|
|
prepare() {
|
|
cd ${_realname}-${pkgver}
|
|
autoreconf -fiv
|
|
}
|
|
|
|
build() {
|
|
declare -a extra_config
|
|
if check_option "debug" "y"; then
|
|
extra_config+=("--enable-asserts")
|
|
else
|
|
extra_config+=("--disable-asserts")
|
|
fi
|
|
|
|
mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static"
|
|
|
|
CPPFLAGS+=" -DGNUTLS_INTERNAL_BUILD" \
|
|
../${_realname}-${pkgver}/configure \
|
|
--prefix=${MINGW_PREFIX} \
|
|
--build=${MINGW_CHOST} \
|
|
--host=${MINGW_CHOST} \
|
|
"${extra_config[@]}" \
|
|
--disable-examples \
|
|
--enable-https \
|
|
--enable-static \
|
|
--disable-shared
|
|
|
|
make
|
|
|
|
mkdir -p "${srcdir}/build-${MSYSTEM}-shared" && cd "${srcdir}/build-${MSYSTEM}-shared"
|
|
|
|
../${_realname}-${pkgver}/configure \
|
|
--prefix=${MINGW_PREFIX} \
|
|
--build=${MINGW_CHOST} \
|
|
--host=${MINGW_CHOST} \
|
|
"${extra_config[@]}" \
|
|
--disable-examples \
|
|
--enable-https \
|
|
--enable-shared \
|
|
--disable-static
|
|
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/build-${MSYSTEM}-static"
|
|
make check || true
|
|
|
|
cd "${srcdir}/build-${MSYSTEM}-shared"
|
|
make check || true
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/build-${MSYSTEM}-static"
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
cd "${srcdir}/build-${MSYSTEM}-shared"
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING "${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE
|
|
}
|