summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 06ca3f641dca7ebc17782af8110a1d45c790f2b9 (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
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>

_android_arch=aarch64

pkgname=android-${_android_arch}-xz
pkgver=5.6.3
pkgrel=1
arch=('any')
pkgdesc="Library and command line tools for XZ and LZMA compressed files (Android ${_android_arch})"
url="https://tukaani.org/xz"
license=('custom' 'GPL' 'LGPL')
groups=('android-xz')
depends=('android-ndk')
makedepends=('android-configure'
             'android-sdk-build-tools'
             'po4a'
             'doxygen')
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://github.com/tukaani-project/xz/archive/refs/tags/v${pkgver}.tar.gz")
md5sums=('89b4230732ebabe75b7edd52da35fd57')

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

    check_ndk_version_ge_than 18.0
    ./autogen.sh
}

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

    android-${_android_arch}-configure \
        --disable-xz \
        --disable-xzdec \
        --disable-lzmadec \
        --disable-lzmainfo \
        --disable-lzma-links \
        --disable-scripts \
        --disable-doc
    make $MAKEFLAGS
}

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

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