mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-27 04:12:29 +01:00
58 lines
1.6 KiB
Plaintext
58 lines
1.6 KiB
Plaintext
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
_luaversions="5.1 5.2 5.3"
|
|
pkgname=lua-evdev
|
|
pkgver=2.2.1
|
|
pkgrel=0
|
|
pkgdesc="Lua module for reading input events"
|
|
url="https://github.com/Tangent128/lua-evdev"
|
|
arch="all"
|
|
license="MIT"
|
|
depends=""
|
|
makedepends="linux-headers"
|
|
subpackages=""
|
|
for _v in $_luaversions; do
|
|
makedepends="$makedepends lua$_v-dev"
|
|
subpackages="$subpackages lua$_v-${pkgname#lua-}:_package"
|
|
done
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/Tangent128/$pkgname/archive/evdev-$pkgver.tar.gz"
|
|
builddir="$srcdir/$pkgname-evdev-$pkgver"
|
|
|
|
prepare() {
|
|
default_prepare || return 1
|
|
|
|
local lver; for lver in $_luaversions; do
|
|
cp -r "$builddir" "$builddir-$lver" || return 1
|
|
done
|
|
}
|
|
|
|
build() {
|
|
local lver; for lver in $_luaversions; do
|
|
msg "Building for Lua $lver..."
|
|
|
|
cd "$builddir-$lver"
|
|
make MYCFLAGS="$CFLAGS $(pkg-config --cflags lua$lver)" || return 1
|
|
done
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir"
|
|
}
|
|
|
|
_package() {
|
|
local lver="${subpkgname:3:3}"
|
|
pkgdesc="$pkgdesc (for Lua $lver)"
|
|
depends="$depends lua$lver"
|
|
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
|
|
|
|
cd "$builddir-$lver"
|
|
|
|
local f; for f in evdev.lua evdev/constants.lua; do
|
|
install -D $f "$subpkgdir"/usr/share/lua/$lver/$f || return 1
|
|
done
|
|
install -D evdev/core.so "$subpkgdir"/usr/lib/lua/$lver/evdev/core.so
|
|
}
|
|
|
|
md5sums="8db10a3079bda7acd20046e0793df678 lua-evdev-2.2.1.tar.gz"
|
|
sha256sums="8ccec638250a839e8567f55e5c61982396ec81f9e339dbf36ee809cb5375c0ae lua-evdev-2.2.1.tar.gz"
|
|
sha512sums="6d8bfb148013c780f7276c884e297b7d6ea55c0c257ac074c677b0dc6495a6087e0e1cb671d844b22d13c9a4c19c544d22a10f3ded5ad3580ccce33c74690871 lua-evdev-2.2.1.tar.gz"
|