Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Maintainer: Weird Gumi <weirdgumi@tutamail.com>

pkgname=llhttp
pkgver=9.4.2
pkgrel=1
pkgdesc='Port of http_parser to llparse'
arch=(x86_64 aarch64 riscv64 loongarch64)
url=https://llhttp.org
license=(MIT)
depends=(musl)
makedepends=(cmake npm)
source=($pkgname-$pkgver.tar.gz::https://github.com/nodejs/$pkgname/archive/refs/tags/v$pkgver.tar.gz)
sha256sums=(600792625144dacf6202a01d93c9d5af4ebe45f5d4f8b49a3902a43f869639c0)

prepare() {
cd $pkgname-$pkgver

# Codegen
npm install
Comment thread
WeirdGumi marked this conversation as resolved.
make RELEASE=$pkgver release
}

build() {
cmake -S $pkgname-$pkgver/release -B build -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
Comment thread
WeirdGumi marked this conversation as resolved.
}

package() {
DESTDIR="$pkgdir" cmake --install build
cd $pkgname-$pkgver
install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname README.md
_install_license_ LICENSE
}