aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lua-cqueues-pushy
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-03-28 15:45:09 +0300
committerTimo Teräs <timo.teras@iki.fi>2016-03-28 15:46:20 +0300
commit1595e926ab809d221c4e92b07129be156c39b3e3 (patch)
treec4b50ecfb714565ea4ca0513cf176d38c1fa45c8 /testing/lua-cqueues-pushy
parentb928439ad003b436fe746122ed9c553cee8885d3 (diff)
downloadaports-1595e926ab809d221c4e92b07129be156c39b3e3.tar.bz2
aports-1595e926ab809d221c4e92b07129be156c39b3e3.tar.xz
testing/lua-cqueues-pushy: new aport
Diffstat (limited to 'testing/lua-cqueues-pushy')
-rw-r--r--testing/lua-cqueues-pushy/APKBUILD74
-rw-r--r--testing/lua-cqueues-pushy/cqpushy.initd10
2 files changed, 84 insertions, 0 deletions
diff --git a/testing/lua-cqueues-pushy/APKBUILD b/testing/lua-cqueues-pushy/APKBUILD
new file mode 100644
index 0000000000..4624f1d0c1
--- /dev/null
+++ b/testing/lua-cqueues-pushy/APKBUILD
@@ -0,0 +1,74 @@
+# Maintainer: Timo Teräs <timo.teras@iki.fi>
+_luaversions="5.2 5.3"
+pkgname=lua-cqueues-pushy
+pkgver=0.20160309
+_commitid=95cedc8d0c800fc0c16632d237ea5f8a3ed95697
+pkgrel=1
+pkgdesc="Framework for logic control (based on cqueues)"
+url="https://github.com/rameplayerorg/lua-cqueues-pushy"
+arch="all"
+license="GPLv2"
+install=""
+depends=""
+makedepends=""
+subpackages=""
+for _i in $_luaversions; do
+ makedepends="$makedepends lua$_i-dev"
+ subpackages="$subpackages lua$_i-cqueues-pushy:split_${_i/./_}"
+done
+source="$pkgname-$pkgver.tar.gz::https://github.com/rameplayerorg/$pkgname/archive/$_commitid.tar.gz
+ cqpushy.initd
+ "
+
+_sdir="$srcdir"/$pkgname-$_commitid
+
+prepare() {
+ local i
+ cd "$_srcdir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ for _v in $_luaversions; do
+ cp -r "$_sdir" "$srcdir"/build-$_v
+ done
+}
+
+build() {
+ for _v in $_luaversions; do
+ cd "$srcdir"/build-$_v
+ make LUA_VERSION=$_v
+ done
+}
+
+package() {
+ for _v in $_luaversions; do
+ cd "$srcdir"/build-$_v
+ make LUA_VERSION=$_v install DESTDIR="$pkgdir" || return 1
+ done
+ install -m755 -D "$srcdir"/cqpushy.initd \
+ "$pkgdir"/etc/init.d/cqpushy || return 1
+}
+
+_split() {
+ local _ver=$1
+ pkgdesc="$pkgdesc - Lua $_ver"
+ depends="lua$_ver-cqueues>=20150616 lua$_ver-struct lua$_ver-posix lua$_ver-ldbus lua$_ver-socket lua$_ver-cjson lua$_ver-penlight"
+ install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
+
+ mkdir -p "$subpkgdir"/usr/share/lua "$subpkgdir"/usr/lib/lua
+ mv "$pkgdir"/usr/share/lua/$_ver "$subpkgdir"/usr/share/lua
+ mv "$pkgdir"/usr/lib/lua/$_ver "$subpkgdir"/usr/lib/lua
+}
+
+for _i in $_luaversions; do
+ eval "split_${_i/./_}() { _split $_i; }"
+done
+
+md5sums="077732fa87c283bc271126c1d008823f lua-cqueues-pushy-0.20160309.tar.gz
+f585d5983128ccb9b9d33a6019107158 cqpushy.initd"
+sha256sums="0cd49978ffe26193aea70b75e2473f94f65d0c4bfc74d4cd36827964bd81bb00 lua-cqueues-pushy-0.20160309.tar.gz
+4ebdbd3299c4b18b7224edc202bd9a4d5a97f325a474ec222901dbedf7f3bc58 cqpushy.initd"
+sha512sums="da016b02f886bc9715c8ad1901290d459598b00ca40bb7d5f9fbbb4814be54a60597b511d44cebc92ac442958f34862605b03632db75e20d3b3d849c41d9a351 lua-cqueues-pushy-0.20160309.tar.gz
+9599db364c3a2e77a7fee61304182961cb6132ce9cb58e9b6837312f52a582e838fdb54eb932c3204b558e3db7228a0412870d0a02125d1017f3402155647bd0 cqpushy.initd"
diff --git a/testing/lua-cqueues-pushy/cqpushy.initd b/testing/lua-cqueues-pushy/cqpushy.initd
new file mode 100644
index 0000000000..869690a246
--- /dev/null
+++ b/testing/lua-cqueues-pushy/cqpushy.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+
+depend() {
+ after net firewall chrony dbus
+}
+
+description="lua-cqueues-pushy"
+command="/etc/cqpushy/cqpushy.lua"
+command_background="yes"
+pidfile="/var/run/cqpushy.pid"