summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bed3443343430b8168672f0cf2d95e61029be814 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: kpcyrd <kpcyrd[at]archlinux[dot]org>
# Contributor: Christian Hesse <eworm@archlinux.org>

_android_arch=x86-64

pkgname=android-${_android_arch}-libnghttp3
pkgver=1.5.0
pkgrel=1
arch=('any')
pkgdesc="HTTP/3 library written in C (Android ${_android_arch})"
url='https://github.com/ngtcp2/nghttp3'
license=('MIT')
depends=('android-ndk')
makedepends=('android-cmake')
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://github.com/ngtcp2/nghttp3/releases/download/v${pkgver}/nghttp3-${pkgver}.tar.xz")
md5sums=('8932c7beeebab620718665d4f6217207')

prepare() {
    cd "${srcdir}/nghttp3-$pkgver"
    source android-env ${_android_arch}

    autoreconf -i
}

build() {
    cd "${srcdir}/nghttp3-$pkgver"
    source android-env ${_android_arch}

    android-${_android_arch}-configure \
        --enable-lib-only
    make $MAKEFLAGS
}

package() {
    cd "${srcdir}/nghttp3-$pkgver"
    source android-env ${_android_arch}

    make DESTDIR="${pkgdir}" install
    rm -rf "${pkgdir}/${ANDROID_PREFIX_SHARE}"
    ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so
    ${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a
}