summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2019-06-12 14:49:32 -0300
committerGonzalo Exequiel Pedone2019-06-12 14:49:32 -0300
commitd0226a18e330bcff07158fcb2503b5ce0375dc9e (patch)
tree5bd735fde9a90988fcf6a5e2ff78d8d7f82891b2
parenta1ebd94f141a6cd62277cf4f1c9f4755fee834ec (diff)
downloadaur-d0226a18e330bcff07158fcb2503b5ce0375dc9e.tar.gz
Package updated.
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD19
-rwxr-xr-xandroid-env.sh101
3 files changed, 11 insertions, 114 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 77777f66ea1..3769bea9a3c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,11 @@
-# Generated by mksrcinfo v8
-# mar abr 23 18:58:10 UTC 2019
pkgbase = android-x86-64-bzip2
pkgdesc = A high-quality data compression program (android)
pkgver = 1.0.6
- pkgrel = 1
+ pkgrel = 2
url = http://sources.redhat.com/bzip2
arch = any
license = custom
+ makedepends = android-environment
makedepends = android-pkg-config
depends = android-ndk
options = !strip
diff --git a/PKGBUILD b/PKGBUILD
index 13fe5d0db9a..8a5a15197ed 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,18 @@
-# PKGBUILD for android-libogg
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
_android_arch=x86-64
-source android-env.sh ${_android_arch}
+source android-env ${_android_arch}
pkgname=android-${_android_arch}-bzip2
pkgver=1.0.6
-pkgrel=1
+pkgrel=2
pkgdesc="A high-quality data compression program (android)"
arch=('any')
url="http://sources.redhat.com/bzip2"
license=("custom")
depends=('android-ndk')
options=(!strip !buildflags staticlibs !emptydirs)
-makedepends=('android-pkg-config')
+makedepends=('android-environment' 'android-pkg-config')
source=("https://fossies.org/linux/misc/bzip2-${pkgver}.tar.gz")
sha1sums=('3f89f861209ce81a6bab1fd1998c0ef311712002')
@@ -28,16 +27,16 @@ build() {
CC=${ANDROID_CC} \
AR=${ANDROID_AR} \
RANLIB=${ANDROID_RANLIB} \
- PREFIX=${ANDROID_LIBS} \
+ PREFIX=${ANDROID_PREFIX} \
$MAKEFLAGS
}
package() {
cd "$srcdir"/bzip2-$pkgver
- install -m755 -d "${pkgdir}"/${ANDROID_LIBS}/include
- install -m644 bzlib.h "${pkgdir}"/${ANDROID_LIBS}/include/
- install -m755 -d "${pkgdir}"/${ANDROID_LIBS}/lib
- install -m644 libbz2.a "${pkgdir}"/${ANDROID_LIBS}/lib/
- ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_LIBS}/lib/*.a
+ install -m755 -d "${pkgdir}"/${ANDROID_PREFIX_INCLUDE}
+ install -m644 bzlib.h "${pkgdir}"/${ANDROID_PREFIX_INCLUDE}/
+ install -m755 -d "${pkgdir}"/${ANDROID_PREFIX_LIB}
+ install -m644 libbz2.a "${pkgdir}"/${ANDROID_PREFIX_LIB}/
+ ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a
}
diff --git a/android-env.sh b/android-env.sh
deleted file mode 100755
index 3549d530bb1..00000000000
--- a/android-env.sh
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/bin/sh
-
-# Useful link to keep track of latest API changes:
-#
-# https://developer.android.com/ndk/downloads/revision_history
-
-_android_arch=$1
-
-if [ -z "${_android_arch}" ]; then
- _android_arch=armv7a-eabi
-fi
-
-# 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_HOME}" ]; then
- export ANDROID_HOME=/opt/android-sdk
-fi
-
-if [ -z "${ANDROID_NDK_HOME}" ]; then
- export ANDROID_NDK_HOME=/opt/android-ndk
-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_HOME}/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_HOME}/platforms/$ANDROID_NDK_PLATFORM
-export ANDROID_TOOLCHAIN=${ANDROID_NDK_HOME}/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_AS=${ANDROID_TOOLS_PREFIX}as
-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
-
-ndk_version() {
- grep 'Pkg.Revision' ${ANDROID_NDK_HOME}/source.properties | awk '{print $3}'
-}
-
-check_ndk_version_ge_than() {
- version=$1
- ndk_ver=$(ndk_version)
-
- if [ "${version}" = "${ndk_ver}" ]; then
- return 0
- fi
-
- older_ver=$(printf "${version}\n${ndk_ver}" | sort -V | head -n 1)
-
- if [ "${older_ver}" = "${ndk_ver}" ]; then
- echo "ERROR: NDK version >= $version required."
-
- return 1
- fi
-
- return 0
-}