aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlliver Schinagl <oliver@schinagl.nl>2019-08-02 07:32:29 +0200
committerKevin Daudt <kdaudt@alpinelinux.org>2019-10-25 18:56:07 +0000
commit711b445b9eed4d01bcb6073a3071968cd42d5a16 (patch)
treef80abe9a2c21bfcd16235b86f0bd711560efa30a
parent35fa263c4e31e5304ba82b887570161a22ba40ba (diff)
downloadaports-711b445b9eed4d01bcb6073a3071968cd42d5a16.tar.gz
aports-711b445b9eed4d01bcb6073a3071968cd42d5a16.tar.bz2
aports-711b445b9eed4d01bcb6073a3071968cd42d5a16.tar.xz
testing/lua-connman_dbus: new aport
Get network information with Connman over DBus Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Closes !14
-rw-r--r--testing/lua-connman_dbus/APKBUILD55
1 files changed, 55 insertions, 0 deletions
diff --git a/testing/lua-connman_dbus/APKBUILD b/testing/lua-connman_dbus/APKBUILD
new file mode 100644
index 0000000000..42f7c203df
--- /dev/null
+++ b/testing/lua-connman_dbus/APKBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
+_luaversions="5.1 5.2 5.3"
+pkgname="lua-connman_dbus"
+_rockname="${pkgname#lua-*}"
+pkgver="0.4.0"
+pkgrel=0
+pkgdesc="Get network information with Connman over DBus"
+url="https://github.com/stefano-m/lua-connman_dbus"
+arch="all"
+license="Apache-2.0"
+depends="connman lua-dbus_proxy"
+subpackages="$pkgname-doc"
+makedepends="luarocks gobject-introspection-dev"
+options="!check" # No checks available
+source="$pkgname-$pkgver.tar.gz::https://github.com/stefano-m/lua-connman_dbus/archive/v$pkgver.tar.gz"
+
+for _luaversion in $_luaversions; do
+ makedepends="$makedepends lua$_luaversion-dev"
+ subpackages="$subpackages lua$_luaversion-$_rockname:_subpackage"
+done
+
+build() {
+ for _luaversion in $_luaversions; do
+ msg "Building for Lua $_luaversion"
+ "luarocks-$_luaversion" \
+ CC="$CC" \
+ CFLAGS="$CFLAGS -fPIC" \
+ LUA_INCDIR="$(pkg-config --variable=includedir "lua$_luaversion")" \
+ LUA_LIBDIR="$(pkg-config --variable=libdir "lua$_luaversion")" \
+ LUA_VERSION="$_luaversion" \
+ make --tree="./build-$_luaversion" \
+ "rockspec/$_rockname-$pkgver-"*".rockspec"
+ done
+}
+
+package() {
+ mkdir -p "$pkgdir/usr/share/doc/$pkgname/"
+ cp -r "docs/" "$pkgdir/usr/share/doc/$pkgname/"
+}
+
+_subpackage() {
+ _luaversion="${subpkgname%-$_rockname}"
+ _luaversion="${_luaversion#lua*}"
+ pkgdesc="$pkgdesc - for Lua $_luaversion"
+ depends="$depends lua$_luaversion"
+ install_if="lua$_luaversion $pkgname=$pkgver-r$pkgrel"
+
+ for _luascript in "$builddir/build-$_luaversion/share/lua/$_luaversion/$_rockname/"*.lua; do
+ install -D -m 644 \
+ -t "$subpkgdir/usr/share/lua/$_luaversion/$_rockname" \
+ "$_luascript"
+ done
+}
+
+sha512sums="a0ae559dac81cca4801159e7d87e6890a196e6151df6178bd5956df725f348be529bdf95337329614261e9e4b270621d97d20dd9c63e50595ba88cadea092015 lua-connman_dbus-0.4.0.tar.gz"