aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-09-17 08:57:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-09-17 08:57:54 +0000
commit4572b9e0de756fca391d855fd418bf6c744217f2 (patch)
treea3120220c76ac3356b298ce41288933c3217ea41 /main
parent9c520e9620e5ad155ce70cbca629bb1244c42b17 (diff)
downloadaports-4572b9e0de756fca391d855fd418bf6c744217f2.tar.bz2
aports-4572b9e0de756fca391d855fd418bf6c744217f2.tar.xz
main/lua-evdev: move from testing
Diffstat (limited to 'main')
-rw-r--r--main/lua-evdev/APKBUILD58
-rw-r--r--main/lua-evdev/cflags.patch8
2 files changed, 66 insertions, 0 deletions
diff --git a/main/lua-evdev/APKBUILD b/main/lua-evdev/APKBUILD
new file mode 100644
index 0000000000..cfbf500886
--- /dev/null
+++ b/main/lua-evdev/APKBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua-evdev
+pkgver=1.2
+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"
+ depends=""
+ mkdir -p "$subpkgdir"
+ mv "$pkgdir"/usr "$subpkgdir"/
+}
+
+
+md5sums="9781899b15890f6930b0df1bbf01da89 lua-evdev-1.2.tar.gz
+b1c0f7d2c7212219e98ec40045a4c848 cflags.patch"
+sha256sums="5026db512a5c0c68b8a15a36736aca0fe432a1825bff6e796cb272d78437b76a lua-evdev-1.2.tar.gz
+20042880b39a3a7bd04a3ee3df00f9df1bde507fc2a902835023fee8e67bc680 cflags.patch"
+sha512sums="9d2ae229129ad806e9c854e4089acf747bb35bd1f9c21d160850afc277206aada61564df296a45f8a27e993f4118a8ff6bd5805cbd9ae7e09110153c59db4e72 lua-evdev-1.2.tar.gz
+2804adb8a07ec9ba1e7c139e7db26cf3bb809058cab4b09e52344d3e351c22923c08ae3c51d4883bbef2167ea3497addce13c4ed2c2f3e1e68b23f8bdf6c83d6 cflags.patch"
diff --git a/main/lua-evdev/cflags.patch b/main/lua-evdev/cflags.patch
new file mode 100644
index 0000000000..52d3647de7
--- /dev/null
+++ b/main/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)
+