diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-12 08:44:04 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-12 08:44:04 +0000 |
commit | 5da044646d4e5f189ebb85f851314e2f3415a104 (patch) | |
tree | 912ed9026e9aee478d8fee92ed929a972ace4607 | |
parent | bc3ca2e4b4dc1d501d1acdb01e29ac063584ade0 (diff) | |
download | aports-5da044646d4e5f189ebb85f851314e2f3415a104.tar.bz2 aports-5da044646d4e5f189ebb85f851314e2f3415a104.tar.xz |
testing/lua-evdev: new aport
Lua module for reading input events
https://github.com/Tangent128/lua-evdev
-rw-r--r-- | testing/lua-evdev/APKBUILD | 57 | ||||
-rw-r--r-- | testing/lua-evdev/cflags.patch | 8 |
2 files changed, 65 insertions, 0 deletions
diff --git a/testing/lua-evdev/APKBUILD b/testing/lua-evdev/APKBUILD new file mode 100644 index 0000000000..c6102f7c40 --- /dev/null +++ b/testing/lua-evdev/APKBUILD @@ -0,0 +1,57 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=lua-evdev +pkgver=1.1 +pkgrel=0 +pkgdesc="Lua module for reading input events" +url="https://github.com/Tangent128/lua-evdev" +arch="all" +license="MIT" +depends="" +depends_dev="" +makedepends="$depends_dev lua5.2-dev" +install="" +subpackages="lua5.2-evdev:_split52" +source="lua-evdev-$pkgver.tar.gz::https://github.com/Tangent128/lua-evdev/archive/evdev-$pkgver.tar.gz + cflags.patch" + +_builddir="$srcdir"/lua-evdev-evdev-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + make CFLAGS="$CFLAGS $(pkg-config --cflags lua5.2)" || return 1 +} + +package() { + cd "$_builddir" + local _v=5.2 + rm -f "$pkgdir"/usr/lib/*.la + for i in evdev.lua evdev/constants.lua; do + install -D $i "$pkgdir"/usr/share/lua/$_v/$i || return 1 + done + for i in evdev/core.so; do + install -D $i "$pkgdir"/usr/lib/lua/$_v/$i || return 1 + done +} + +_split52() { + pkgdesc="$pkgdesc - Lua 5.2" + mkdir -p "$subpkgdir" + mv "$pkgdir"/usr "$subpkgdir"/ +} + + +md5sums="e4ef501a77720498bc1dd8daf84a6c32 lua-evdev-1.1.tar.gz +b1c0f7d2c7212219e98ec40045a4c848 cflags.patch" +sha256sums="c9b5cfc741cac1ba7fd0208cc74375f72eb606da3ef7c00ed45c7ea415106291 lua-evdev-1.1.tar.gz +20042880b39a3a7bd04a3ee3df00f9df1bde507fc2a902835023fee8e67bc680 cflags.patch" +sha512sums="1b00f743145810ac3c15e18c5dddb52ba88d7fb593e01bee3b858f0cb5ddf6da20e564a75e56650d615be6d39a107b6fa2a6ac74ee6ef3cd222313c0e3a5f5ca lua-evdev-1.1.tar.gz +2804adb8a07ec9ba1e7c139e7db26cf3bb809058cab4b09e52344d3e351c22923c08ae3c51d4883bbef2167ea3497addce13c4ed2c2f3e1e68b23f8bdf6c83d6 cflags.patch" diff --git a/testing/lua-evdev/cflags.patch b/testing/lua-evdev/cflags.patch new file mode 100644 index 0000000000..52d3647de7 --- /dev/null +++ b/testing/lua-evdev/cflags.patch @@ -0,0 +1,8 @@ +--- ./Makefile.orig ++++ ./Makefile +@@ -1,4 +1,4 @@ + + evdev/core.so: evdev/core.c +- gcc -shared -o evdev/core.so -fPIC -Wall -Wextra -pedantic -std=c99 evdev/core.c ++ gcc $(CFLAGS) -shared -o evdev/core.so -fPIC -Wall -Wextra -pedantic -std=c99 evdev/core.c $(LDFLAGS) + |