From d3f843f0420f906c758f6b0dd24bdcb05f21f2f1 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Mon, 5 Jan 2026 22:21:22 +0200 Subject: [PATCH] Update dependencies and split package --- pkg.info | 33 +++++++++++++++++++++++++++++++-- source.sh | 31 ++++++++++++++++++++++++++++--- 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/pkg.info b/pkg.info index cd0b081..69af33b 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: libinput description: Input device management and event handling library version: 1.30.1 -revision: 2 +revision: 3 url: https://gitlab.freedesktop.org/libinput/libinput license: MIT architecture: any @@ -9,15 +9,44 @@ type: source depends: - glibc - libevdev + - libwacom - mtdev - udev make_depends: + - cairo - check + - glib + - gtk4 + - libx11 - meson - - wayland-protocols + - python3 + - python-libevdev + - python-pyudev + - python-pyyaml - python-pytest + - wayland + - wayland-protocols downloads: - url: https://gitlab.freedesktop.org/libinput/libinput/-/archive/${BPM_PKG_VERSION}/libinput-${BPM_PKG_VERSION}.tar.gz extract_to: ${BPM_SOURCE} extract_strip_components: 1 checksum: 4339a2b9cc96ede3c120dedaedc61e48ce567808c5229e66587525ea972ef617 +split_packages: + - name: libinput + - name: libinput-tools + description: Debug tools for libinput + depends: + - cairo + - gcc-libs + - glib + - glibc + - gtk4 + - libevdev + - libinput + - libx11 + - python3 + - python-libevdev + - python-pyudev + - python-pyyaml + - udev + - wayland diff --git a/source.sh b/source.sh index 33e8484..8852ba5 100644 --- a/source.sh +++ b/source.sh @@ -8,9 +8,9 @@ build() { meson setup build --prefix=/usr \ --libdir=/usr/lib \ --buildtype=release \ - -Ddebug-gui=false \ + -Ddebug-gui=true \ -Dtests=true \ - -Dlibwacom=false \ + -Dlibwacom=true \ -Dudev-dir=/usr/lib/udev meson compile -C build } @@ -21,9 +21,34 @@ check() { meson test -C build --print-errorlogs } +_pick() { + local p="$1" f d; shift + for f; do + [ -d "$BPM_WORKDIR"/output_"$p" ] || { echo "Split package $p not found"; exit 1; } + d="$BPM_WORKDIR"/output_"$p"/"${f#$BPM_OUTPUT}" + mkdir -p "$(dirname "$d")" + mv "$f" "$d" + rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")" + done +} + # The package function is executed in the source directory # This function is used to move the compiled files into the output directory -package() { +package_libinput() { + meson install -C build --destdir="$BPM_OUTPUT" + + cd "$BPM_OUTPUT" + # Move debug tools to separate package + _pick libinput-tools usr/bin + _pick libinput-tools usr/libexec + _pick libinput-tools usr/share/man + _pick libinput-tools usr/share/zsh + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/libinput/COPYING +} + +package_libinput-tools() { meson install -C build --destdir="$BPM_OUTPUT" # Install package license