From ae8d38fac3fa2ae7d6a1be363eb62529c5f9b02e Mon Sep 17 00:00:00 2001 From: june-fish Date: Fri, 5 Jul 2024 22:05:11 -0700 Subject: [PATCH] add open-in-mpv --- anda/tools/open-in-mpv/anda.hcl | 5 +++ anda/tools/open-in-mpv/open-in-mpv.spec | 44 +++++++++++++++++++++++++ anda/tools/open-in-mpv/update.rhai | 1 + 3 files changed, 50 insertions(+) create mode 100644 anda/tools/open-in-mpv/anda.hcl create mode 100644 anda/tools/open-in-mpv/open-in-mpv.spec create mode 100644 anda/tools/open-in-mpv/update.rhai diff --git a/anda/tools/open-in-mpv/anda.hcl b/anda/tools/open-in-mpv/anda.hcl new file mode 100644 index 0000000000..84ff0a97ff --- /dev/null +++ b/anda/tools/open-in-mpv/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "open-in-mpv.spec" + } +} diff --git a/anda/tools/open-in-mpv/open-in-mpv.spec b/anda/tools/open-in-mpv/open-in-mpv.spec new file mode 100644 index 0000000000..bc44c62b06 --- /dev/null +++ b/anda/tools/open-in-mpv/open-in-mpv.spec @@ -0,0 +1,44 @@ +#%global debug_package %{nil} + +Name: open-in-mpv +Version: 2.2.2 +Release: 1%?dist +Summary: CLI component of open-in-mpv browser extension + +License: MIT +URL: https://github.com/Baldomo/open-in-mpv +Source0: https://github.com/Baldomo/open-in-mpv/archive/refs/tags/v%{version}.tar.gz + +ExclusiveArch: %{golang_arches} + +BuildRequires: go-rpm-macros +BuildRequires: git +BuildRequires: elfutils + +%description +This is a simple web extension (for Chrome and Firefox) which helps open any video in the currently open tab in the mpv player. + +The extension itself shares a lot of code with the one from the awesome iina, while the (bare) native binary is written in Go (this is a rewrite from C++). + +%prep +%autosetup -p1 + +%build +make build/linux/open-in-mpv + +%install +install -Dm755 build/linux/open-in-mpv %{buildroot}%{_bindir}/open-in-mpv +install -Dm644 scripts/open-in-mpv.desktop %{buildroot}%{_datarootdir}/applications/open-in-mpv.desktop + +%post +update-desktop-database %{_datarootdir}/applications +xdg-mime default open-in-mpv.desktop x-scheme-handler/mpv + +%files +%license LICENSE +%doc README.md +%{_bindir}/open-in-mpv +%{_datarootdir}/applications/open-in-mpv.desktop + +%changelog +%autochangelog diff --git a/anda/tools/open-in-mpv/update.rhai b/anda/tools/open-in-mpv/update.rhai new file mode 100644 index 0000000000..9a8dbd2d7e --- /dev/null +++ b/anda/tools/open-in-mpv/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("Baldomo/open-in-mpv"));