47 lines
1.4 KiB
Bash
47 lines
1.4 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=http-parser
|
|
pkgver=2.9.4
|
|
_debver=2.9.4
|
|
_debrel=4
|
|
pkgrel=1
|
|
pkgdesc="Parser for HTTP Request/Response written in C"
|
|
arch=('i686' 'x86_64')
|
|
url="https://github.com/nodejs/http-parser"
|
|
license=('Expat')
|
|
depends=('glibc')
|
|
makedepends=('quilt')
|
|
source=($pkgname-$pkgver.tar.gz::"https://github.com/nodejs/http-parser/archive/v$pkgver.tar.gz"
|
|
"https://deb.debian.org/debian/pool/main/h/http-parser/http-parser_$_debver-$_debrel.debian.tar.xz")
|
|
sha512sums=('b45df7b94d1c51079d44687d0a7f901f44faae51df4e84c7e3fe38f130c2d809d0e7c2a146c57b3723e60732aededc246bf44eadb10a95b710963d641f9fe7cd'
|
|
'b53f017d667d893256607926c3bd8243ae3a45b79a8290652cf55fdb41c35e7d2894ea61763e6c83e3cd96882eba95680d2327224465a6221d98e61802052d23')
|
|
|
|
prepare() {
|
|
cd $pkgname-$pkgver
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
mv "$srcdir"/debian .
|
|
|
|
# Doesn't apply
|
|
rm -v debian/patches/debian.improve-installation.patch || true
|
|
|
|
quilt push -av
|
|
fi
|
|
sed -i 's|-Werror||' Makefile
|
|
}
|
|
|
|
build() {
|
|
cd $pkgname-$pkgver
|
|
make library
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$pkgver
|
|
make PREFIX="$pkgdir/usr" install
|
|
install -Dm644 LICENSE-MIT -t "$pkgdir"/usr/share/licenses/$pkgname/
|
|
}
|