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

_android_arch=armv7a-eabi

pkgname=android-${_android_arch}-speexdsp
pkgver=1.2.1
pkgrel=1
pkgdesc="DSP library derived from Speex (android)"
arch=(any)
url="http://www.speexdsp.org"
license=("BSD")
depends=('android-ndk')
options=(!strip !buildflags staticlibs !emptydirs)
makedepends=('android-configure')
source=("http://downloads.xiph.org/releases/speex/speexdsp-$pkgver.tar.gz")
md5sums=('e6eb5ddef743a362c8018f260b91dca5')

prepare() {
    source android-env ${_android_arch}
    check_ndk_version_ge_than 18.0
}

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

    android-${_android_arch}-configure \
        --disable-neon

    make $MAKEFLAGS
}

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

    make DESTDIR="$pkgdir" install

    for f in $(find "$pkgdir/${ANDROID_PREFIX_LIB}" -type l -name "lib*.so"); do
        mv -vf "$(realpath "$f")" "$f"
    done

    rm -vf "$pkgdir"/${ANDROID_PREFIX_LIB}/lib*.so.*
    rm -r "${pkgdir}"/${ANDROID_PREFIX_SHARE}
    ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so
    ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a
}