summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c75ffd28d41123b3f8dde7df5ab29dddfcc05d4b (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
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: Antonio Rojas <arojas@archlinux.org>
# Contributor: James An <james@jamesan.ca>
# Contributor: Daniel Nagy <danielnagy at gmx de>

_android_arch=armv7a-eabi

pkgname=android-${_android_arch}-libde265
pkgver=1.0.15
pkgrel=2
arch=('any')
pkgdesc="Open h.265 video codec implementation (Android ${_android_arch})"
url='https://github.com/strukturag/libde265'
license=('LGPL3')
depends=('android-ndk')
makedepends=('android-configure')
options=(!strip !buildflags staticlibs !emptydirs)
source=("https://github.com/strukturag/libde265/releases/download/v${pkgver}/libde265-${pkgver}.tar.gz")
md5sums=('d61e9fb8052b8d90d76ab67fd84e018d')

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

    extra_options=

    case "${_android_arch}" in
        armv7a-eabi)
            extra_options=--disable-arm
            ;;
        *)
            ;;
    esac

    export CFLAGS="${CFLAGS} -fPIC"
    export CXXFLAGS="${CXXFLAGS} -fPIC"

    android-${_android_arch}-configure \
        --disable-dec265 \
        --disable-sherlock265 \
        ${extra_options}
    make $MAKEFLAGS
}

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

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