1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 19:55:26 +03:00
aports/community/llhttp/APKBUILD
2023-02-06 20:37:49 +01:00

40 lines
949 B
Text

# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=llhttp
pkgver=8.1.0
pkgrel=0
pkgdesc="Port of http_parser to llparse"
url="https://llhttp.org/"
license="MIT"
arch="all"
makedepends="cmake clang npm"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/nodejs/llhttp/archive/v$pkgver/llhttp-$pkgver.tar.gz"
prepare() {
default_prepare
npm ci
}
build() {
make release RELEASE="$pkgver"
cmake -S release -B releasebuild \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON
cmake --build releasebuild
}
check() {
npm test
}
package() {
DESTDIR="$pkgdir" cmake --install releasebuild
install -Dm644 LICENSE-MIT "$pkgdir"/usr/share/doc/$pkgname/LICENSE
}
sha512sums="
363f8b3f8aa743f2529c0738b8b95dd682bacf7bd1afa1fc9b8a1d67251e1ced90b986402939ea484bc2cf511a83819b3def6345885ad59e8854c7c263d999da llhttp-8.1.0.tar.gz
"