diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 57 |
3 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ecb5db5040d0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = android-x86-lz4 + pkgdesc = Very fast lossless compression algorithm (android) + pkgver = 1.9.4 + pkgrel = 1 + url = http://lz4.github.io/lz4/ + arch = any + license = GPL2 + makedepends = android-cmake + depends = android-ndk + options = !strip + options = !buildflags + options = staticlibs + options = !emptydirs + source = https://github.com/lz4/lz4/archive/v1.9.4.tar.gz + sha256sums = 0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b + +pkgname = android-x86-lz4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f3ed6a151b9f --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +glib/ +pkg/ +src/ +*.log +*.tar +*.xz +*.pkg.tar.zst diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e1cd45c0096e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com> + +_android_arch=x86 + +pkgname=android-${_android_arch}-lz4 +pkgver=1.9.4 +pkgrel=1 +arch=('any') +pkgdesc='Very fast lossless compression algorithm (android)' +url='http://lz4.github.io/lz4/' +license=('GPL2') +depends=('android-ndk') +makedepends=('android-cmake') +options=(!strip !buildflags staticlibs !emptydirs) +source=("https://github.com/lz4/lz4/archive/v${pkgver}.tar.gz") +sha256sums=('0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b') + +build() { + cd "${srcdir}/lz4-${pkgver}" + source android-env ${_android_arch} + + mkdir -p build-static && pushd build-static + android-${_android_arch}-cmake \ + -DLIB_INSTALL_DIR=lib \ + -DBUILD_SHARED_LIBS=OFF \ + -DLZ4_BUILD_CLI=OFF \ + -DLZ4_BUILD_LEGACY_LZ4C=OFF \ + ../build/cmake + make $MAKEFLAGS + popd + + mkdir -p build-shared && pushd build-shared + android-${_android_arch}-cmake \ + -DLIB_INSTALL_DIR=lib \ + -DBUILD_SHARED_LIBS=ON \ + -DLZ4_BUILD_CLI=OFF \ + -DLZ4_BUILD_LEGACY_LZ4C=OFF \ + ../build/cmake + make $MAKEFLAGS + popd +} + +package() { + cd "${srcdir}/lz4-${pkgver}" + source android-env ${_android_arch} + + for _type in static shared; do + pushd build-${_type} + make install DESTDIR="${pkgdir}" + popd + done + + #rm -rf "${pkgdir}/${ANDROID_PREFIX_BIN}" + rm -rf "${pkgdir}/${ANDROID_PREFIX_SHARE}" + ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a || true + ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so +} |