summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7b94346ebb5f5de1547a38822c2bfa070c74f9ee (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
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor 03/08/04 <lefungus@altern.org>

_android_arch=x86-64

pkgname=android-${_android_arch}-libmatroska
pkgver=1.7.1
pkgrel=1
arch=('any')
pkgdesc="Matroska library (Android ${_android_arch})"
url='https://github.com/Matroska-Org/libmatroska'
license=('LGPL2.1')
groups=('android-libmatroska')
depends=("android-${_android_arch}-libebml")
makedepends=('android-cmake')
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://github.com/Matroska-Org/libmatroska/archive/refs/tags/release-${pkgver}.tar.gz")
md5sums=('ef677bdd7ce5559253e1c9211d68ec7d')

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

    android-${_android_arch}-cmake \
        -S . \
        -B build-shared \
        -DBUILD_SHARED_LIBS=ON \
        -DEBML_DIR="${ANDROID_PREFIX_LIB}/cmake/EBML"
    make -C build-shared

    android-${_android_arch}-cmake \
        -S . \
        -B build-static \
        -DBUILD_SHARED_LIBS=OFF \
        -DEBML_DIR="${ANDROID_PREFIX_LIB}/cmake/EBML"
    make -C build-shared
}

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

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