# Maintainer: Anatol Pomozov # Contributor: Zhuoyun Wei # Contributor: Max Resch pkgbase="nghttp2" pkgname=("nghttp2" "libnghttp2" "libnghttp2_asio") pkgdesc='Framing layer of HTTP/2 is implemented as a reusable C library' pkgver=1.17.0 pkgrel=1 arch=(i686 x86_64) url='https://nghttp2.org/' license=(MIT) source=(nghttp2-$pkgver.zip::https://github.com/tatsuhiro-t/nghttp2/archive/v$pkgver.zip) sha256sums=('b3c4df089058f8c4ec6a89e84c306bee3bb597f047ed3e1d0ecdd78eeffea6fd') build() { cd nghttp2-$pkgver autoreconf -i ./configure \ --prefix=/usr \ --with-spdylay=no \ --disable-examples \ --disable-python-bindings \ --enable-asio-lib make } check() { cd nghttp2-$pkgver make check } package_nghttp2() { pkgdesc='Framing layer of HTTP/2, reverse proxy and tools' depends=(openssl libev zlib libxml2 jansson jemalloc libnghttp2) backup=( etc/nghttpx/nghttpx.conf etc/logrotate.d/nghttpx ) cd "nghttp2-$pkgver/src" make DESTDIR="$pkgdir" install-binPROGRAMS install-man # remove libraries, installed in seperate packages rm -rf "$pkgdir/usr/include" rm -rf "$pkgdir/usr/lib" cd .. install -Dm644 contrib/nghttpx.service "$pkgdir/usr/lib/systemd/system/nghttpx.service" install -Dm644 contrib/nghttpx-logrotate "$pkgdir/etc/logrotate.d/nghttpx" install -Dm644 nghttpx.conf.sample "$pkgdir/etc/nghttpx/nghttpx.conf" install -Dm644 COPYING "$pkgdir/usr/share/licenses/nghttp2/COPYING" } package_libnghttp2() { cd "nghttp2-$pkgver/lib" make DESTDIR="$pkgdir" install } package_libnghttp2_asio() { pkgdesc='Framing layer of HTTP/2, C++ ASIO library' depends=(boost-libs libnghttp2) cd "nghttp2-$pkgver/src" make DESTDIR="$pkgdir" install-libLTLIBRARIES install-pkgconfigDATA cd includes make DESTDIR="$pkgdir" install }