Add android-armv7a-eabi variant for own packages

This commit is contained in:
Martchus 2019-03-02 14:38:08 +01:00
parent d4aa2e755a
commit a0a24ec13b
4 changed files with 330 additions and 0 deletions

View File

@ -0,0 +1,94 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_reponame=cpp-utilities
_pkgname=c++utilities
_android_arch=armeabi-v7a
_pkg_arch=armv7a-eabi
_android_toolchain=$_pkg_arch-linux-android
_android_platform=21
_prefix=/opt/android-libs/$_pkg_arch
pkgname=android-$_pkg_arch-$_pkgname
pkgver=4.17.0
pkgrel=1
arch=('any')
pkgdesc="Common C++ classes and routines such as argument parser, IO and conversion utilities (Android, $_pkg_arch)"
license=('GPL')
depends=("android-$_pkg_arch-libiconv" "android-$_pkg_arch-boost")
optdepends=("$_pkgname-doc: API documentation")
checkdepends=("android-$_pkg_arch-cppunit")
# FIXME: run tests with qemu
#checkdepends+=('qemu-binfmt-arm' "android-$_pkg_arch-linker")
makedepends=('cmake' 'android-ndk' 'android-sdk')
conflicts=("android-$_pkgname-$_android_arch")
replaces=("android-$_pkgname-$_android_arch")
url="https://github.com/Martchus/${_reponame}"
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
sha256sums=('92d288b606b4f32d69686cbf5a264f90e5e00d80894583a9df2284d593cdc2b4')
options=(!buildflags staticlibs !strip !emptydirs)
prepare() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
}
build() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
local android_sdk_path=${ANDROID_SDK_ROOT:-/opt/android-sdk}
local android_ndk_path=${ANDROID_NDK_ROOT:-/opt/android-ndk}
local include_dir=$_prefix/include
cmake \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION=$_android_platform \
-DCMAKE_ANDROID_ARCH_ABI=$_android_arch \
-DCMAKE_ANDROID_SDK="$android_sdk_path" \
-DCMAKE_ANDROID_NDK="$android_ndk_path" \
-DCMAKE_ANDROID_STL_TYPE=c++_shared \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$_prefix \
-DCMAKE_FIND_ROOT_PATH="$android_ndk_path/sysroot;$_prefix" \
-DUSE_NATIVE_FILE_BUFFER=ON \
-DNO_DOXYGEN=ON \
-Diconv_DYNAMIC_INCLUDE_DIR="$include_dir" \
-Diconv_STATIC_INCLUDE_DIR="$include_dir" \
-Dboost_iostreams_DYNAMIC_INCLUDE_DIR="$include_dir" \
-Dboost_iostreams_STATIC_INCLUDE_DIR="$include_dir" \
-Dcppunit_DYNAMIC_INCLUDE_DIR="$include_dir" \
-Dcppunit_STATIC_INCLUDE_DIR="$include_dir" \
-Dcppunit_DYNAMIC_LIB="$_prefix/lib/libcppunit-1.14.so" \
-Dcppunit_STATIC_LIB="$_prefix/lib/libcppunit.a" \
.
make VERBOSE=1
}
check() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
# can not run the tests so compile them at least
make tests VERBOSE=1
# FIXME: run tests with qemu
# * currently getting error
# "libc: Fatal signal 4 (SIGILL), code 2, fault addr 0x4000c28b40 in tid 193 (test), pid 193 (test)"
# * not possible because the default Linux kernel is not able to run Android libc?
# use dynamic linker supposed to be located under $prefix/system/bin/linker64
#export QEMU_LD_PREFIX=$prefix
# use libraries from build directory, prefix and Android NDK
#export LD_LIBRARY_PATH=$PWD:$prefix/lib:$android_ndk_path/sources/cxx-stl/llvm-libc++/libs/arm64-v8a:$android_ndk_path/platforms/android-28/arch-arm64/usr/lib
#make check VERBOSE=1
}
package() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
make DESTDIR="${pkgdir}" install
# add tests to the package for possibly executing them later under Android
if [[ -f ${_pkgname}_tests ]]; then
mkdir "${pkgdir}/$_prefix/bin"
cp ${_pkgname}_tests "${pkgdir}/$_prefix/bin"
fi
}

View File

@ -0,0 +1,90 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_reponame=passwordfile
_pkgname=passwordfile
_android_arch=armeabi-v7a
_pkg_arch=armv7a-eabi
_android_toolchain=$_pkg_arch-linux-android
_android_platform=21
_prefix=/opt/android-libs/$_pkg_arch
pkgname=android-$_pkg_arch-$_pkgname
pkgver=4.0.1
pkgrel=1
arch=('any')
pkgdesc="C++ library to read/write passwords from/to encrypted files using AES-256-CBC via OpenSSL (Android, $_pkg_arch)"
license=('GPL')
depends=("android-$_pkg_arch-c++utilities" "android-$_pkg_arch-openssl")
optdepends=("$_pkgname-doc: API documentation")
makedepends=('cmake' 'android-ndk' 'android-sdk')
checkdepends=("android-$_pkg_arch-cppunit")
# FIXME: run tests with qemu
#checkdepends+=('qemu-binfmt-arm' "android-$_pkg_arch-linker")
conflicts=("android-$_pkgname-$_android_arch")
replaces=("android-$_pkgname-$_android_arch")
url="https://github.com/Martchus/${_reponame}"
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
sha256sums=('8bad5a214ce46670e48f1ba916a54319072c6b4bdf75e45f0ad64bdf57f61278')
options=(!buildflags staticlibs !strip !emptydirs)
prepare() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
}
build() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
local android_sdk_path=${ANDROID_SDK_ROOT:-/opt/android-sdk}
local android_ndk_path=${ANDROID_NDK_ROOT:-/opt/android-ndk}
local include_dir=$_prefix/include
cmake \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION=$_android_platform \
-DCMAKE_ANDROID_ARCH_ABI=$_android_arch \
-DCMAKE_ANDROID_SDK="$android_sdk_path" \
-DCMAKE_ANDROID_NDK="$android_ndk_path" \
-DCMAKE_ANDROID_STL_TYPE=c++_shared \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$_prefix \
-DCMAKE_FIND_ROOT_PATH="$android_ndk_path/sysroot;$_prefix" \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath-link,$_prefix/lib" \
-Dcrypto_DYNAMIC_INCLUDE_DIR="$include_dir" \
-Dcrypto_STATIC_INCLUDE_DIR="$include_dir" \
-Dcrypto_DYNAMIC_LIB="$_prefix/lib/libcrypto.so" \
-Dcrypto_STATIC_LIB="$_prefix/lib/libcrypto.a" \
-DNO_DOXYGEN=ON \
.
make VERBOSE=1
}
check() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
# can not run the tests so compile them at least
make tests VERBOSE=1
# FIXME: run tests with qemu
# * currently getting error
# "libc: Fatal signal 4 (SIGILL), code 2, fault addr 0x4000c28b40 in tid 193 (test), pid 193 (test)"
# * not possible because the default Linux kernel is not able to run Android libc?
# use dynamic linker supposed to be located under $prefix/system/bin/linker64
#export QEMU_LD_PREFIX=$prefix
# use libraries from build directory, prefix and Android NDK
#export LD_LIBRARY_PATH=$PWD:$prefix/lib:$android_ndk_path/sources/cxx-stl/llvm-libc++/libs/arm64-v8a:$android_ndk_path/platforms/android-28/arch-arm64/usr/lib
#make check VERBOSE=1
}
package() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
make DESTDIR="${pkgdir}" install
# add tests to the package for possibly executing them later under Android
if [[ -f ${_pkgname}_tests ]]; then
mkdir "${pkgdir}/$_prefix/bin"
cp ${_pkgname}_tests "${pkgdir}/$_prefix/bin"
fi
}

View File

@ -0,0 +1,56 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_reponame=qtutilities
_pkgname=qtutilities
_android_arch=armeabi-v7a
_pkg_arch=armv7a-eabi
_android_toolchain=$_pkg_arch-linux-android
_android_platform=21
_prefix=/opt/android-libs/$_pkg_arch
pkgname=android-$_pkg_arch-$_pkgname
pkgver=5.12.2
pkgrel=1
arch=('any')
pkgdesc="Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models (Android, $_pkg_arch)"
license=('GPL')
depends=("android-$_pkg_arch-c++utilities" "android-$_pkg_arch-qt5")
optdepends=("$_pkgname-doc: API documentation")
makedepends=('cmake' 'android-ndk' 'android-sdk')
conflicts=("android-$_pkgname-$_android_arch")
replaces=("android-$_pkgname-$_android_arch")
url="https://github.com/Martchus/${_reponame}"
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
sha256sums=('636d3bc9f378e413d14d349b03849ad3da70290f6a25b36bdc80e4fda35776b0')
options=(!buildflags staticlibs !strip !emptydirs)
prepare() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
}
build() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
cmake \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION=$_android_platform \
-DCMAKE_ANDROID_ARCH_ABI=$_android_arch \
-DCMAKE_ANDROID_NDK=/opt/android-ndk \
-DCMAKE_ANDROID_SDK=/opt/android-sdk \
-DCMAKE_ANDROID_STL_TYPE=c++_shared \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$_prefix" \
-DCMAKE_FIND_ROOT_PATH="/opt/android-ndk/sysroot;$_prefix" \
-DNO_DOXYGEN=ON \
-DWIDGETS_GUI=OFF \
-DQUICK_GUI=ON \
.
make VERBOSE=1
}
package() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
make DESTDIR="${pkgdir}" install
}

View File

@ -0,0 +1,90 @@
# Maintainer: Martchus <martchus@gmx.net>
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
_reponame=tagparser
_pkgname=tagparser
_android_arch=armeabi-v7a
_pkg_arch=armv7a-eabi
_android_toolchain=$_pkg_arch-linux-android
_android_platform=21
_prefix=/opt/android-libs/$_pkg_arch
pkgname=android-$_pkg_arch-$_pkgname
pkgver=8.2.0
pkgrel=1
arch=('any')
pkgdesc="C++ library for reading and writing MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags (Android, $_pkg_arch)"
license=('GPL')
depends=("android-$_pkg_arch-c++utilities")
optdepends=("$_pkgname-doc: API documentation")
checkdepends=("android-$_pkg_arch-cppunit" "android-$_pkg_arch-openssl")
# FIXME: run tests with qemu
#checkdepends+=('qemu-binfmt-arm' "android-$_pkg_arch-linker")
makedepends=('cmake' 'android-ndk' 'android-sdk')
#conflicts=("android-$_pkgname-$_android_arch")
#replaces=("android-$_pkgname-$_android_arch")
url="https://github.com/Martchus/${_reponame}"
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
sha256sums=('c695b21327510840b37fe474dde698628a1215b5b7e66591d2393c628f528302')
options=(!buildflags staticlibs !strip !emptydirs)
prepare() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
}
build() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
local android_sdk_path=${ANDROID_SDK_ROOT:-/opt/android-sdk}
local android_ndk_path=${ANDROID_NDK_ROOT:-/opt/android-ndk}
local include_dir=$_prefix/include
cmake \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION=$_android_platform \
-DCMAKE_ANDROID_ARCH_ABI=$_android_arch \
-DCMAKE_ANDROID_SDK="$android_sdk_path" \
-DCMAKE_ANDROID_NDK="$android_ndk_path" \
-DCMAKE_ANDROID_STL_TYPE=c++_shared \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$_prefix \
-DCMAKE_FIND_ROOT_PATH="$android_ndk_path/sysroot;$_prefix" \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath-link,$_prefix/lib" \
-DNO_DOXYGEN=ON \
-Dcppunit_DYNAMIC_INCLUDE_DIR="$include_dir" \
-Dcppunit_STATIC_INCLUDE_DIR="$include_dir" \
-Dcppunit_DYNAMIC_LIB="$_prefix/lib/libcppunit-1.14.so" \
-Dcppunit_STATIC_LIB="$_prefix/lib/libcppunit.a" \
.
make VERBOSE=1
}
check() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
# can not run the tests so compile them at least
make tests VERBOSE=1
# FIXME: see c++utilities
#if [[ -z $TEST_FILE_PATH ]]; then
# msg2 'Skipping execution of testsuite because the environment variable TEST_FILE_PATH is not set.'
# return
#fi
#export LD_LIBRARY_PATH=$PWD:$prefix/lib:$android_ndk_path/sources/cxx-stl/llvm-libc++/libs/arm64-v8a:$android_ndk_path/platforms/android-28/arch-arm64/usr/lib
#make check VERBOSE=1
}
package() {
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
make DESTDIR="${pkgdir}" install
# add tests to the package for possibly executing them later under Android
if [[ -f ${_pkgname}_tests ]]; then
mkdir "${pkgdir}/$_prefix/bin"
cp ${_pkgname}_tests "${pkgdir}/$_prefix/bin"
fi
}