summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2019-04-04 16:41:11 -0300
committerGonzalo Exequiel Pedone2019-04-04 16:41:11 -0300
commit5a3764fdab3c111c0c5bdb983e33bc9e95378009 (patch)
tree1aabca8703b9bebde025c3c9335cd2a4c1e1adac
downloadaur-5a3764fdab3c111c0c5bdb983e33bc9e95378009.tar.gz
Created android-libogg package.
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD52
-rwxr-xr-xandroid-env.sh73
3 files changed, 150 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..30dfe4da48b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+# Generated by mksrcinfo v8
+# jue abr 4 19:39:40 UTC 2019
+pkgbase = android-armv7a-eabi-libogg
+ pkgdesc = Ogg bitstream and framing library (android)
+ pkgver = 1.3.3
+ pkgrel = 1
+ url = http://xiph.org
+ arch = any
+ license = BSD
+ makedepends = android-pkg-config
+ depends = apache-ant
+ depends = android-ndk>=r18.b
+ depends = android-platform-22
+ depends = android-sdk-25.2.5
+ depends = android-sdk-build-tools
+ depends = android-sdk-platform-tools
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ options = !emptydirs
+ source = http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz
+ sha256sums = c2e8a485110b97550f453226ec644ebac6cb29d1caef2902c007edab4308d985
+
+pkgname = android-armv7a-eabi-libogg
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2eaa6644a93
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# PKGBUILD for android-ffmpeg
+# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
+
+_android_arch=armv7a-eabi
+source android-env.sh ${_android_arch}
+
+pkgname=android-${_android_arch}-libogg
+pkgver=1.3.3
+pkgrel=1
+pkgdesc="Ogg bitstream and framing library (android)"
+arch=(any)
+url="http://xiph.org"
+license=('BSD')
+depends=('apache-ant'
+ 'android-ndk>=r18.b'
+ "android-platform-$ANDROID_MINIMUM_PLATFORM"
+ 'android-sdk-25.2.5'
+ 'android-sdk-build-tools'
+ 'android-sdk-platform-tools')
+options=(!strip !buildflags staticlibs !emptydirs)
+makedepends=('android-pkg-config')
+source=(http://downloads.xiph.org/releases/ogg/libogg-${pkgver}.tar.gz)
+sha256sums=('c2e8a485110b97550f453226ec644ebac6cb29d1caef2902c007edab4308d985')
+
+build() {
+ cd "${srcdir}"/libogg-${pkgver}
+
+ export CC=${ANDROID_CC}
+ export CXX=${ANDROID_CXX}
+ target=${_android_arch/x86-/x86_}-linux-android
+
+ ./configure \
+ --host=${target} \
+ --target=${target} \
+ --build="$CHOST" \
+ --prefix=${ANDROID_LIBS} \
+ --libdir=${ANDROID_LIBS}/lib \
+ --includedir=${ANDROID_LIBS}/include \
+ --enable-shared \
+ --enable-static
+
+ make $MAKEFLAGS
+}
+
+package() {
+ cd "${srcdir}"/libogg-${pkgver}
+
+ make DESTDIR="$pkgdir" install
+ rm -r "${pkgdir}"/${ANDROID_LIBS}/share/doc
+ ${ANDROID_STRIP} "${pkgdir}"/${ANDROID_LIBS}/lib/*.so
+ ${ANDROID_STRIP} "$pkgdir"/${ANDROID_LIBS}/lib/*.a
+}
diff --git a/android-env.sh b/android-env.sh
new file mode 100755
index 00000000000..d9f6b78ecbb
--- /dev/null
+++ b/android-env.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# Useful link to keep track of latest API changes:
+#
+# https://developer.android.com/ndk/downloads/revision_history
+
+_android_arch=$1
+
+# Minimum Android platform based on:
+#
+# https://developer.android.com/about/dashboards/
+if [ -z "${ANDROID_MINIMUM_PLATFORM}" ]; then
+ export ANDROID_MINIMUM_PLATFORM=22
+fi
+
+if [ -z "${ANDROID_NDK_ROOT}" ]; then
+ export ANDROID_NDK_ROOT=/opt/android-ndk
+fi
+
+if [ -z "${ANDROID_SDK_ROOT}" ]; then
+ export ANDROID_SDK_ROOT=/opt/android-sdk
+fi
+
+get_last() {
+ ls $1 | sort -V | tail -n 1
+}
+
+if [ -z "${ANDROID_BUILD_TOOLS_REVISION}" ]; then
+ export ANDROID_BUILD_TOOLS_REVISION=$(get_last ${ANDROID_SDK_ROOT}/build-tools)
+fi
+
+if [ -z "${ANDROID_API_VERSION}" ]; then
+ export ANDROID_API_VERSION=android-$ANDROID_MINIMUM_PLATFORM
+fi
+
+if [ -z "${ANDROID_NDK_PLATFORM}" ]; then
+ export ANDROID_NDK_PLATFORM=android-$ANDROID_MINIMUM_PLATFORM
+fi
+
+export ANDROID_PLATFORM=${ANDROID_NDK_ROOT}/platforms/$ANDROID_NDK_PLATFORM
+export ANDROID_TOOLCHAIN=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64
+export ANDROID_SYSROOT=${ANDROID_TOOLCHAIN}/sysroot
+export ANDROID_CROSS_PREFIX=$ANDROID_TOOLCHAIN/bin/
+export ANDROID_PKGCONFIG=android-${_android_arch}-pkg-config
+
+case "$_android_arch" in
+ aarch64)
+ export ANDROID_TOOLS_COMPILER_PREFIX=${ANDROID_CROSS_PREFIX}aarch64-linux-android${ANDROID_MINIMUM_PLATFORM}-
+ export ANDROID_TOOLS_PREFIX=${ANDROID_CROSS_PREFIX}aarch64-linux-android-
+ ;;
+ armv7a-eabi)
+ export ANDROID_TOOLS_COMPILER_PREFIX=${ANDROID_CROSS_PREFIX}armv7a-linux-androideabi${ANDROID_MINIMUM_PLATFORM}-
+ export ANDROID_TOOLS_PREFIX=${ANDROID_CROSS_PREFIX}arm-linux-androideabi-
+ ;;
+ x86)
+ export ANDROID_TOOLS_COMPILER_PREFIX=${ANDROID_CROSS_PREFIX}i686-linux-android${ANDROID_MINIMUM_PLATFORM}-
+ export ANDROID_TOOLS_PREFIX=${ANDROID_CROSS_PREFIX}i686-linux-android-
+ ;;
+ x86-64)
+ export ANDROID_TOOLS_COMPILER_PREFIX=${ANDROID_CROSS_PREFIX}x86_64-linux-android${ANDROID_MINIMUM_PLATFORM}-
+ export ANDROID_TOOLS_PREFIX=${ANDROID_CROSS_PREFIX}x86_64-linux-android-
+ ;;
+esac
+
+export ANDROID_CC=${ANDROID_TOOLS_COMPILER_PREFIX}clang
+export ANDROID_CXX=${ANDROID_TOOLS_COMPILER_PREFIX}clang++
+export ANDROID_AR=${ANDROID_TOOLS_PREFIX}ar
+export ANDROID_NM=${ANDROID_TOOLS_PREFIX}nm
+export ANDROID_RANLIB=${ANDROID_TOOLS_PREFIX}ranlib
+export ANDROID_STRIP=${ANDROID_TOOLS_PREFIX}strip
+export ANDROID_LIBS=/opt/android-libs/${_android_arch}
+export PKG_CONFIG_SYSROOT_DIR=${ANDROID_LIBS}
+export PKG_CONFIG_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig:${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig