aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-evdev/APKBUILD
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-12-21 07:49:00 +0000
committerTimo Teräs <timo.teras@iki.fi>2015-12-21 07:49:00 +0000
commit34df0ce797c542bd0a557c4bc9eb5ee7559fee10 (patch)
treed80f4e22d5bb1fd660a33961ea23c935c5a7ee89 /main/lua-evdev/APKBUILD
parentdef945176f32666f8918f86862b9f91a1ee0048c (diff)
downloadaports-34df0ce797c542bd0a557c4bc9eb5ee7559fee10.tar.bz2
aports-34df0ce797c542bd0a557c4bc9eb5ee7559fee10.tar.xz
main/lua-evdev: upgrade to 2.2, build for all lua versions
Diffstat (limited to 'main/lua-evdev/APKBUILD')
-rw-r--r--main/lua-evdev/APKBUILD65
1 files changed, 39 insertions, 26 deletions
diff --git a/main/lua-evdev/APKBUILD b/main/lua-evdev/APKBUILD
index d0df9b2584..218fa99c01 100644
--- a/main/lua-evdev/APKBUILD
+++ b/main/lua-evdev/APKBUILD
@@ -1,20 +1,23 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+_luaversions="5.1 5.2 5.3"
pkgname=lua-evdev
-pkgver=1.2
+pkgver=2.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 linux-headers"
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"
+makedepends="linux-headers"
+subpackages=""
+for _i in $_luaversions; do
+ makedepends="$makedepends lua$_i-dev"
+ subpackages="$subpackages lua$_i-evdev:split_${_i/./_}"
+done
+source="lua-evdev-$pkgver.tar.gz::https://github.com/Tangent128/lua-evdev/archive/evdev-$pkgver.tar.gz"
-_builddir="$srcdir"/lua-evdev-evdev-$pkgver
+_sdir="$srcdir"/lua-evdev-evdev-$pkgver
prepare() {
local i
cd "$_builddir"
@@ -23,35 +26,45 @@ prepare() {
*.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() {
- cd "$_builddir"
- make CFLAGS="$CFLAGS $(pkg-config --cflags lua5.2)" || return 1
+ for _v in $_luaversions; do
+ cd "$srcdir"/build-$_v
+ make MYCFLAGS="$CFLAGS $(pkg-config --cflags lua$_v)" || return 1
+ done
}
package() {
- cd "$_builddir"
- local _v=5.2
- 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
+ for _v in $_luaversions; do
+ cd "$srcdir"/build-$_v
+ 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
done
}
-_split52() {
- pkgdesc="$pkgdesc - Lua 5.2"
+_split() {
+ local _ver=$1
+ pkgdesc="$pkgdesc - Lua $_ver"
depends=""
- mkdir -p "$subpkgdir"
- mv "$pkgdir"/usr "$subpkgdir"/
+ 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="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"
+md5sums="c91a12b9f269f298ebd2da87332cf93d lua-evdev-2.2.tar.gz"
+sha256sums="a808513e1ae19124e7d75d649d3783c790d7d963fe0816376a46eaa3861245d3 lua-evdev-2.2.tar.gz"
+sha512sums="6216fe9bec48a6c2564598f833a6507408ffcba76e632aead6c507db30f218588f64fbb07ff74d9beb37dff704fdb4e8a59b485741fcdd0e010aeb75bece953f lua-evdev-2.2.tar.gz"