From 3df35be6940e35a2f25e651b38d149fc8a5917a5 Mon Sep 17 00:00:00 2001 From: Xavier Fortier Date: Wed, 8 Jan 2025 09:24:10 -0500 Subject: [PATCH] New package: walker-0.12.0 --- srcpkgs/walker/patches/systemd.patch | 54 ++++++++++++++++++++++++++++ srcpkgs/walker/template | 33 +++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 srcpkgs/walker/patches/systemd.patch create mode 100644 srcpkgs/walker/template diff --git a/srcpkgs/walker/patches/systemd.patch b/srcpkgs/walker/patches/systemd.patch new file mode 100644 index 00000000000000..145e234116e47d --- /dev/null +++ b/srcpkgs/walker/patches/systemd.patch @@ -0,0 +1,54 @@ +--- a/cmd/walker.go ++++ b/cmd/walker.go +@@ -21,7 +21,6 @@ + "github.com/abenz1267/walker/internal/state" + "github.com/abenz1267/walker/internal/ui" + "github.com/abenz1267/walker/internal/util" +- "github.com/adrg/xdg" + "github.com/davidbyttow/govips/v2/vips" + "github.com/diamondburned/gotk4/pkg/gio/v2" + "github.com/diamondburned/gotk4/pkg/glib/v2" +@@ -125,34 +124,6 @@ + } + } + +- if slices.Contains(args, "-A") || slices.Contains(args, "--enableautostart") { +- content := ` +-[Desktop Entry] +-Name=Walker +-Comment=Walker Service +-Exec=walker --gapplication-service +-StartupNotify=false +-Terminal=false +-Type=Application +- ` +- +- err := os.WriteFile(filepath.Join(xdg.ConfigHome, "autostart", "walker-service.desktop"), []byte(strings.TrimSpace(content)), 0644) +- if err != nil { +- log.Panicln(err) +- } +- +- return +- } +- +- if slices.Contains(args, "-D") || slices.Contains(args, "--disableautostart") { +- err := os.Remove(filepath.Join(xdg.ConfigHome, "autostart", "walker-service.desktop")) +- if err != nil { +- log.Panicln(err) +- } +- +- return +- } +- + if isNew { + appName = fmt.Sprintf("%s-%d", appName, time.Now().Unix()) + } +@@ -178,8 +149,6 @@ + app.AddMainOption("forceprint", 'f', glib.OptionFlagNone, glib.OptionArgNone, "forces printing input if no item is selected", "") + app.AddMainOption("bench", 'b', glib.OptionFlagNone, glib.OptionArgNone, "prints nanoseconds for start and displaying in both service and client", "") + app.AddMainOption("active", 'a', glib.OptionFlagNone, glib.OptionArgString, "active item", "") +- app.AddMainOption("enableautostart", 'A', glib.OptionFlagNone, glib.OptionArgNone, "creates a desktop file for autostarting on login", "") +- app.AddMainOption("disableautostart", 'D', glib.OptionFlagNone, glib.OptionArgNone, "removes the autostart desktop file", "") + + app.Connect("activate", ui.Activate(state)) + diff --git a/srcpkgs/walker/template b/srcpkgs/walker/template new file mode 100644 index 00000000000000..1aa27f19a71c52 --- /dev/null +++ b/srcpkgs/walker/template @@ -0,0 +1,33 @@ +# Template file for 'walker' +pkgname=walker +version=0.12.0 +revision=1 +build_style=go +build_helper="gir" +go_import_path=github.com/abenz1267/walker +go_package="./cmd" +hostmakedepends="gobject-introspection pkg-config" +makedepends="gtk4-layer-shell-devel libvips-devel" +depends="gtk4-layer-shell $(vopt_if calculator qalculate) + $(vopt_if clipboard wl-clipboard)" +short_desc="Multi-Purpose highly extendable application launcher for Wayland" +maintainer="Xavier Fortier " +license="MIT" +homepage="https://github.com/abenz1267/walker" +changelog="https://github.com/abenz1267/walker/releases" +distfiles="https://github.com/abenz1267/walker/archive/v${version}.tar.gz" +checksum=71df6b623d5363d4db1075afb33e078b3d3099328f6922f2e481edb506713917 + +# Package options +build_options="calculator clipboard" +build_options_default="clipboard" +desc_option_calculator="Enable calculator module" +desc_option_clipboard="Enable clipboard module" + +do_build() { + go build -o ${GOPATH}/bin/${pkgname} ${go_package} +} + +post_install() { + vlicense LICENSE +}