summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD40
3 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ae0c11e547e4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = android-x86-64-libdeflate
+ pkgdesc = Heavily optimized library for DEFLATE/zlib/gzip compression and decompression (Android x86-64)
+ pkgver = 1.20
+ pkgrel = 1
+ url = https://github.com/ebiggers/libdeflate
+ arch = any
+ license = MIT
+ makedepends = android-cmake
+ depends = android-ndk
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ options = !emptydirs
+ source = https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.20.tar.gz
+ md5sums = 14494b58c42b3bf65b4c469a8e4252ab
+
+pkgname = android-x86-64-libdeflate
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b5b03b115225
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+pkg
+src
+*.tar.xz
+*.tar.gz
+*.tar.bz2
+*.asc
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..dfdd036e33dd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
+# Contributor: Maxime Gauduin <alucryd@archlinux.org>
+# Contributor: Chocobo1 <chocobo1@archlinux.net>
+
+_android_arch=x86-64
+
+pkgname=android-${_android_arch}-libdeflate
+pkgver=1.20
+pkgrel=1
+arch=('any')
+pkgdesc="Heavily optimized library for DEFLATE/zlib/gzip compression and decompression (Android ${_android_arch})"
+url='https://github.com/ebiggers/libdeflate'
+license=('MIT')
+depends=('android-ndk')
+makedepends=('android-cmake')
+options=(!strip !buildflags staticlibs !emptydirs)
+source=("https://github.com/ebiggers/libdeflate/archive/refs/tags/v${pkgver}.tar.gz")
+md5sums=('14494b58c42b3bf65b4c469a8e4252ab')
+
+build() {
+ cd "${srcdir}/libdeflate-$pkgver"
+ source android-env ${_android_arch}
+
+ android-${_android_arch}-cmake \
+ -S . \
+ -B build \
+ -DLIBDEFLATE_BUILD_STATIC_LIB=ON \
+ -DLIBDEFLATE_BUILD_TESTS=OFF \
+ -DLIBDEFLATE_BUILD_GZIP=OFF
+ cmake --build build
+}
+
+package() {
+ cd "${srcdir}/libdeflate-$pkgver"
+ source android-env ${_android_arch}
+
+ DESTDIR="${pkgdir}" cmake --install build
+ ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so
+ ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a
+}