diff options
author | Olliver Schinagl <oliver@schinagl.nl> | 2019-08-01 22:18:17 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-09-26 10:26:45 +0000 |
commit | 9e5d430d8ad0381d1880c5429288f3e2c915f27c (patch) | |
tree | 5e447c75f9caabc6b53d07514e22e0501c610e79 /testing | |
parent | 9c391026082e86e72af2e75bc67bc4352e811f25 (diff) | |
download | aports-9e5d430d8ad0381d1880c5429288f3e2c915f27c.tar.bz2 aports-9e5d430d8ad0381d1880c5429288f3e2c915f27c.tar.xz |
testing/lua-dbus_proxy: new aport
A lua rock that is a simple API around GLib's GIO:GDBusProxy built on top of lgi
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/lua-dbus_proxy/APKBUILD | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/testing/lua-dbus_proxy/APKBUILD b/testing/lua-dbus_proxy/APKBUILD new file mode 100644 index 0000000000..d3456fe2ba --- /dev/null +++ b/testing/lua-dbus_proxy/APKBUILD @@ -0,0 +1,55 @@ +# Maintainer: Olliver Schinagl <oliver@schinagl.nl> +_luaversions="5.1 5.2 5.3" +pkgname="lua-dbus_proxy" +_rockname="${pkgname#lua-*}" +pkgver="0.9.0" +pkgrel=0 +pkgdesc="Simple API around GLib's GIO:GDBusProxy built on top of lgi" +url="https://github.com/stefano-m/lua-dbus_proxy" +arch="all" +license="Apache-2.0" +depends="dbus lua-lgi" +subpackages="${pkgname}-doc" +makedepends="luarocks gobject-introspection-dev" +options="!check" # Tests require running dbus server to interact with +source="${pkgname}-${pkgver}.tar.gz::https://github.com/stefano-m/lua-dbus_proxy/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="f49a91f0f1b53a5cc5b5266ecc1f500e46676ccb910750827ef778ba5ed740d135d3b49592c8256a23a7770604a77d3fc110854626b35b5e67bb7608ee633eb1 lua-dbus_proxy-0.9.0.tar.gz" |