diff options
author | Gabriel Felix | 2024-02-26 16:45:08 -0300 |
---|---|---|
committer | Gabriel Felix | 2024-02-26 17:26:35 -0300 |
commit | 968d621711229cf01fe1a7787a738af04696a6d3 (patch) | |
tree | a0365263df3e591067b8ca03aed80f0f1a5818e9 | |
parent | ba778a011fce0bc4f8be2d7084a08664a150737a (diff) | |
download | aur-968d621711229cf01fe1a7787a738af04696a6d3.tar.gz |
Add wmenu_run script and patch
Adds a patch to bring dmenu_run functionality to wmenu. The code for the
script is from https://lists.sr.ht/~adnano/wmenu-devel/patches/39820
and the meson.build modification comes from
https://lists.sr.ht/~adnano/wmenu-devel/patches/49727
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | add-wmenu-run.patch | 55 |
3 files changed, 78 insertions, 11 deletions
@@ -1,5 +1,5 @@ -pkgbase = wmenu - pkgdesc = Efficient dynamic menu for Wayland and wlroots based Wayland compositors +pkgbase = wmenu-run + pkgdesc = wmenu with a wmenu_run script patch applied pkgver = 0.1.6 pkgrel = 1 url = https://git.sr.ht/~adnano/wmenu @@ -14,6 +14,8 @@ pkgbase = wmenu depends = libpango-1.0.so depends = libwayland-client.so source = wmenu-0.1.6.tar.gz::https://git.sr.ht/~adnano/wmenu/archive/0.1.6.tar.gz + source = add-wmenu-run.patch b2sums = f624773e29c751cb0d890d428482019bab35af1d3f540a53233307d30955dd5936a3eab483be7dac471aab6a85a4cd1953d9a75f095130316a13f96684d52477 + b2sums = eca8709e45402044d6df8cff62e03573f669b432a040554eee12d2105b51780d66b5611828c8537ee69d8a3d1c2e2bb06896a3fe20ebefb2299ad903ff89b1bf -pkgname = wmenu +pkgname = wmenu-run @@ -1,10 +1,12 @@ -# Maintainer: Brett Cornwall <ainola@archlinux.org> +# Maintainer: Gabriel Felix <5u67q32x@duck.com> +# Contributor: Brett Cornwall <ainola@archlinux.org> # Contributor: nullcoder -pkgname=wmenu +_pkgname=wmenu +pkgname="$_pkgname-run" pkgver=0.1.6 pkgrel=1 -pkgdesc="Efficient dynamic menu for Wayland and wlroots based Wayland compositors" +pkgdesc="wmenu with a wmenu_run script patch applied" arch=('x86_64') url="https://git.sr.ht/~adnano/wmenu" license=('MIT') @@ -21,19 +23,27 @@ depends=( 'libwayland-client.so' ) source=( - "$pkgname-$pkgver.tar.gz::https://git.sr.ht/~adnano/wmenu/archive/$pkgver.tar.gz" + "$_pkgname-$pkgver.tar.gz::https://git.sr.ht/~adnano/wmenu/archive/$pkgver.tar.gz" + "add-wmenu-run.patch" ) -b2sums=('f624773e29c751cb0d890d428482019bab35af1d3f540a53233307d30955dd5936a3eab483be7dac471aab6a85a4cd1953d9a75f095130316a13f96684d52477') +b2sums=('f624773e29c751cb0d890d428482019bab35af1d3f540a53233307d30955dd5936a3eab483be7dac471aab6a85a4cd1953d9a75f095130316a13f96684d52477' + 'eca8709e45402044d6df8cff62e03573f669b432a040554eee12d2105b51780d66b5611828c8537ee69d8a3d1c2e2bb06896a3fe20ebefb2299ad903ff89b1bf') build() { - cd "$pkgname-$pkgver" + cd "$_pkgname-$pkgver" arch-meson build ninja -C build } +prepare() { + cd "$_pkgname-$pkgver" + patch --forward --strip=1 --input="${srcdir}/add-wmenu-run.patch" +} + package() { - cd "$pkgname-$pkgver" + cd "$_pkgname-$pkgver" DESTDIR="$pkgdir" ninja -C build install - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE" + chmod 655 "$pkgdir/usr/bin/wmenu_run" } diff --git a/add-wmenu-run.patch b/add-wmenu-run.patch new file mode 100644 index 000000000000..6f91ec9ddaab --- /dev/null +++ b/add-wmenu-run.patch @@ -0,0 +1,55 @@ +diff '--color=auto' --new-file --text --unified --recursive wmenu-0.1.6.orig/meson.build wmenu-0.1.6.new/meson.build +--- wmenu-0.1.6.orig/meson.build 2024-02-26 16:10:40.116773860 -0300 ++++ wmenu-0.1.6.new/meson.build 2024-02-26 16:11:38.250466476 -0300 +@@ -33,6 +33,8 @@ + subdir('protocols') + subdir('docs') + ++install_data('wmenu_run', install_dir: get_option('bindir')) ++ + executable( + 'wmenu', + files( +diff '--color=auto' --new-file --text --unified --recursive wmenu-0.1.6.orig/wmenu_run wmenu-0.1.6.new/wmenu_run +--- wmenu-0.1.6.orig/wmenu_run 1969-12-31 21:00:00.000000000 -0300 ++++ wmenu-0.1.6.new/wmenu_run 2024-02-26 16:12:29.227035337 -0300 +@@ -0,0 +1,39 @@ ++#!/bin/sh ++ ++cache_dir="${XDG_CACHE_HOME:-"$HOME/.cache"}" ++cache="$cache_dir/wmenu_run" ++ ++uptodate() ++{ ++ IFS=: ++ for path in $PATH ++ do ++ test "$path" -nt "$cache" && ++ return 1 ++ done ++ ++ return 0 ++} ++ ++get_bin() ++{ ++ IFS=: ++ for path in $PATH ++ do ++ for bin in "$path"/* ++ do ++ [ -x "$bin" ] && ++ echo "${bin##*/}" ++ done ++ done ++} ++ ++[ -d "$cache_dir" ] || ++ mkdir -p "$cache_dir" ++ ++if [ -f "$cache" ] && uptodate ++then ++ wmenu "$@" < "$cache" | ${SHELL:-"/bin/sh"} & ++else ++ get_bin | sort -u | tee "$cache" | wmenu "$@" | ${SHELL:-"/bin/sh"} & ++fi |