diff options
author | Gonzalo Exequiel Pedone | 2024-02-28 23:41:26 -0300 |
---|---|---|
committer | Gonzalo Exequiel Pedone | 2024-02-28 23:41:26 -0300 |
commit | 86dd42a2e62ada104967a6c73abda765aab933ff (patch) | |
tree | e0092d2ae6b3ac6ae18c63a54d2e8c8c285eee79 | |
download | aur-86dd42a2e62ada104967a6c73abda765aab933ff.tar.gz |
New package.
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 45 |
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..79beded9ebf6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = android-x86-64-libsodium + pkgdesc = P(ortable|ackageable) NaCl-based crypto library (android) + pkgver = 1.0.19 + pkgrel = 1 + url = https://github.com/jedisct1/libsodium + arch = any + license = custom:ISC + makedepends = android-configure + depends = android-ndk + options = !strip + options = !buildflags + options = staticlibs + options = !emptydirs + source = https://download.libsodium.org/libsodium/releases/libsodium-1.0.19.tar.gz + sha512sums = 8e9b6d796f6330e00921ce37f1b43545966094250938626ae227deef5fd1279f2fc18b5cd55e23484732a27df4d919cf0d2f07b9c2f1aa0c0ef689e668b0d439 + +pkgname = android-x86-64-libsodium diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..97589fb4de69 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD +!*.install +!*.patch +!*.diff diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1d2a1b22400d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com> +# Contributor: Felix Yan <felixonmars@archlinux.org> +# Contributor: namelessjon <jonathan.stott@gmail.com> +# Contributor: Alessio Sergi <asergi at archlinux dot us> + +_android_arch=x86-64 + +pkgname=android-${_android_arch}-libsodium +pkgver=1.0.19 +pkgrel=1 +arch=('any') +pkgdesc="P(ortable|ackageable) NaCl-based crypto library (android)" +url="https://github.com/jedisct1/libsodium" +license=('custom:ISC') +depends=('android-ndk') +makedepends=('android-configure') +options=(!strip !buildflags staticlibs !emptydirs) +source=("https://download.libsodium.org/libsodium/releases/libsodium-$pkgver.tar.gz") +sha512sums=('8e9b6d796f6330e00921ce37f1b43545966094250938626ae227deef5fd1279f2fc18b5cd55e23484732a27df4d919cf0d2f07b9c2f1aa0c0ef689e668b0d439') + +build() { + cd "${srcdir}/libsodium-stable" + source android-env ${_android_arch} + + # Platform specific patches + case "$_android_arch" in + aarch64) + export CFLAGS="${CFLAGS} -march=armv8-a+crypto" + ;; + *) + ;; + esac + + android-${_android_arch}-configure + make $MAKEFLAGS +} + +package() { + cd "${srcdir}/libsodium-stable" + source android-env ${_android_arch} + + make DESTDIR="$pkgdir" install + ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a + ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so +} |