This commit is contained in:
xiota 2026-02-06 22:01:39 +00:00
parent aaa1b9a7f0
commit 7e970feb20
2 changed files with 64 additions and 9 deletions

View file

@ -1,23 +1,28 @@
pkgbase = aelkey
pkgdesc = Lua-based input remapping framework
pkgver = 0.0.1
pkgver = 0.0.2
pkgrel = 1
url = https://github.com/xiota/aelkey
arch = x86_64
license = GPL-3.0-or-later
makedepends = cli11
makedepends = git
makedepends = go-md2man
makedepends = linux-api-headers
makedepends = meson
depends = dbus
depends = libevdev.so
depends = libjack.so
depends = libudev.so
depends = libusb-1.0.so
depends = lua
source = aelkey::git+https://github.com/xiota/aelkey.git#tag=0.0.1
optdepends = bluez: provides BLE GATT services
optdepends = pipewire-jack: recommended jack server
options = !debug
options = !strip
options = !lto
source = aelkey::git+https://github.com/xiota/aelkey.git#tag=0.0.2
source = nerixyz.sol2::git+https://github.com/Nerixyz/sol2.git
sha256sums = 56ebab4d190c3c772315cedab89feaf6d8b650690ac32c5082d2e18837a7c3b0
sha256sums = 6bd524edd5d37964950d4c40a6ba8248d5d071987220a484daf5197a7ad206d2
sha256sums = SKIP
pkgname = aelkey

View file

@ -1,8 +1,10 @@
# Maintainer:
: ${_debug=false} # asan/a, asan-debug/ad, true/t, false/f
_pkgname="aelkey"
pkgname="$_pkgname"
pkgver=0.0.1
pkgver=0.0.2
pkgrel=1
pkgdesc="Lua-based input remapping framework"
url="https://github.com/xiota/aelkey"
@ -12,17 +14,23 @@ arch=('x86_64')
depends=(
'dbus'
'libevdev.so'
'libjack.so'
'libudev.so'
'libusb-1.0.so'
'lua'
)
makedepends=(
'cli11'
'git'
'go-md2man'
'linux-api-headers'
'meson'
)
optdepends=(
'bluez: provides BLE GATT services'
'pipewire-jack: recommended jack server'
)
options=('!debug' '!strip' '!lto')
_pkgsrc="$_pkgname"
_pkgsrc_sol="nerixyz.sol2"
@ -31,7 +39,7 @@ source=(
"$_pkgsrc_sol"::"git+https://github.com/Nerixyz/sol2.git"
)
sha256sums=(
'56ebab4d190c3c772315cedab89feaf6d8b650690ac32c5082d2e18837a7c3b0'
'6bd524edd5d37964950d4c40a6ba8248d5d071987220a484daf5197a7ad206d2'
'SKIP'
)
@ -40,15 +48,57 @@ prepare() {
}
build() {
arch-meson build "$_pkgsrc"
local _meson_options=()
case "${_debug::1}" in
asan | a)
_meson_options+=(
--buildtype=debugoptimized
-Db_sanitize=address,undefined
-Db_lundef=false
-Db_asneeded=false
)
;;
asan-debug | asan-d | ad)
_meson_options+=(
--buildtype=debug
-Db_sanitize=address,undefined
-Db_lundef=false
-Db_asneeded=false
)
;;
t | true)
_meson_options+=(
--buildtype=debugoptimized
)
;;
esac
arch-meson "${_meson_options[@]}" build "$_pkgsrc"
meson compile -C build
}
package() {
meson install -C build --destdir "$pkgdir"
# convenience script
if [[ "${_debug::1}" == "a" ]]; then
install -Dm755 /dev/stdin "$pkgdir/usr/bin/aelkey" << END
#!/usr/bin/env sh
export LD_PRELOAD=/usr/lib/libasan.so
export LUA_INIT='aelkey = require("aelkey")'
exec lua "\$@"
END
else
install -Dm755 /dev/stdin "$pkgdir/usr/bin/aelkey" << END
#!/usr/bin/env sh
export LUA_INIT='aelkey = require("aelkey")'
exec lua "\$@"
END
fi
# api reference
go-md2man -in "$_pkgsrc/docs/aelkey-reference.md" \
lua "$_pkgsrc/docs/stitch.lua" "$_pkgsrc/docs/readme.md" \
| go-md2man \
| install -Dm644 /dev/stdin "$pkgdir/usr/share/man/man7/aelkey.7"
# udev rules