summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 887e191e442b855ec87f7e21f30749d07f3afc1b (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Martchus <martchus@gmx.net>

_android_arch=armv7a-eabi

pkgname=android-${_android_arch}-gnutls
pkgver=3.8.5
pkgrel=1
arch=('any')
pkgdesc="A library which provides a secure layer over a reliable transport layer (Android ${_android_arch})"
url="https://www.gnutls.org/"
license=('GPL-3.0-or-later AND LGPL-2.1-or-later')
depends=("android-${_android_arch}-libtasn1"
         "android-${_android_arch}-readline"
         "android-${_android_arch}-zlib"
         "android-${_android_arch}-nettle"
         "android-${_android_arch}-p11-kit"
         "android-${_android_arch}-libunistring")
makedepends=('android-configure'
             'autogen')
optdepends=("android-${_android_arch}-openssl: libgnutls-openssl")
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://www.gnupg.org/ftp/gcrypt/gnutls/v${pkgver%.*}/gnutls-${pkgver}.tar.xz")
md5sums=('74b468201ef7e9035f78d44c3f0906c4')

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

    autoreconf -vfi
}

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

    android-${_android_arch}-configure \
        --with-idn \
        --with-brotli \
        --with-zstd \
        --with-tpm2 \
        --disable-doc \
        --enable-ktls \
        --enable-openssl-compatibility \
        --disable-srp-authentication \
        --disable-rpath \
        --disable-non-suiteb-curves \
        --disable-gtk-doc \
        --disable-full-test-suite \
        --disable-rpath \
        --disable-tools \
        --with-libiconv-prefix="${ANDROID_PREFIX}" \
        --enable-nls \
        --enable-cxx \
        --without-tpm \
        --without-tpm2
    make $MAKEFLAGS
}

package() {
    cd "${srcdir}/gnutls-${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
}