summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2024-02-29 11:09:55 -0300
committerGonzalo Exequiel Pedone2024-02-29 11:09:55 -0300
commit40acc9b75f10dba7f00c216b09588e4069077d38 (patch)
tree2bf95ef21a2194aea1a6be2997543c7340b28c49
downloadaur-40acc9b75f10dba7f00c216b09588e4069077d38.tar.gz
New package.
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD48
3 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fd10e0d792ff
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = android-x86-libnl
+ pkgdesc = Library for applications dealing with netlink sockets (android)
+ pkgver = 3.9.0
+ pkgrel = 1
+ url = https://github.com/thom311/libnl/
+ arch = any
+ license = GPL
+ makedepends = android-configure
+ depends = android-ndk
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ options = !emptydirs
+ source = https://github.com/thom311/libnl/releases/download/libnl3_9_0/libnl-3.9.0.tar.gz
+ source = https://github.com/thom311/libnl/releases/download/libnl3_9_0/libnl-3.9.0.tar.gz.sig
+ validpgpkeys = 49EA7C670E0850E7419514F629C2366E4DFC5728
+ sha256sums = aed507004d728a5cf11eab48ca4bf9e6e1874444e33939b9d3dfed25018ee9bb
+ sha256sums = SKIP
+
+pkgname = android-x86-libnl
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..982db4eb4c01
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+pkg
+src
+*.tar.xz
+*.tar.gz
+*.tar.bz2
+*.asc
+*.sign
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8fa50514b78d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Thomas Bächler <thomas@archlinux.org>
+
+_android_arch=x86
+
+pkgname=android-${_android_arch}-libnl
+pkgver=3.9.0
+pkgrel=1
+arch=('any')
+pkgdesc='Library for applications dealing with netlink sockets (android)'
+url='https://github.com/thom311/libnl/'
+license=('GPL')
+depends=('android-ndk')
+makedepends=('android-configure')
+options=(!strip !buildflags staticlibs !emptydirs)
+source=("https://github.com/thom311/libnl/releases/download/libnl${pkgver//./_}/libnl-${pkgver}.tar.gz"{,.sig})
+sha256sums=('aed507004d728a5cf11eab48ca4bf9e6e1874444e33939b9d3dfed25018ee9bb'
+ 'SKIP')
+validpgpkeys=('49EA7C670E0850E7419514F629C2366E4DFC5728') # Thomas Haller
+
+prepare() {
+ cd "${srcdir}/libnl-$pkgver"
+
+ sed -i 's|-lpthread||g' configure
+}
+
+build() {
+ cd "${srcdir}/libnl-$pkgver"
+ source android-env ${_android_arch}
+
+ export CFLAGS="${CFLAGS} -Din_addr_t=uint32_t"
+ export CXXFLAGS="${CXXFLAGS} -Din_addr_t=uint32_t"
+
+ android-${_android_arch}-configure \
+ --enable-cli=no
+ make $MAKEFLAGS
+}
+
+package() {
+ cd "${srcdir}/libnl-$pkgver"
+ source android-env ${_android_arch}
+
+ make DESTDIR="$pkgdir" install
+ rm -rf "${pkgdir}/${ANDROID_PREFIX_SHARE}"
+ ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so
+ ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a
+}