summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 29f778279ed90f61e3b6b1314caf0fb53dc3b98c (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
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Bruno Pagani <archange@archlinux.org>

_android_arch=riscv64

pkgname=android-${_android_arch}-libaec
pkgver=1.1.3
pkgrel=1
pkgdesc="Adaptive Entropy Coding library (Android ${_android_arch})"
arch=('any')
url="https://gitlab.dkrz.de/k202009/libaec"
license=('custom')
groups=('android-libaec')
depends=('android-ndk')
makedepends=('android-cmake')
options=(!strip !buildflags staticlibs !emptydirs)
source=("${url}/-/archive/v${pkgver}/libaec-v${pkgver}.tar.bz2")
md5sums=('9e2f718be47a108e3495b36dfd4c17cc')

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

    android-${_android_arch}-cmake \
        -S . \
        -B build
    make -C build $MAKEFLAGS
}

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

    make -C build DESTDIR="${pkgdir}" install
    ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so
    ${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a
    mv "${pkgdir}/${ANDROID_PREFIX}/cmake" "${pkgdir}/${ANDROID_PREFIX_LIB}/cmake"
    install -Dm644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}