From c5d95ebafdbc8b8c0cf4bbb8c45d89c9d7ae19e8 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Fri, 17 Jan 2025 02:38:01 -0800 Subject: [PATCH] add: kmonad (#3033) (#3035) * add: kmonad * packager (cherry picked from commit 22996bf9c6b97d433669743ac5f44833e57777b7) Co-authored-by: sadlerm4 --- anda/tools/kmonad/anda.hcl | 5 ++ anda/tools/kmonad/kmonad.spec | 93 +++++++++++++++++++++++++++++++++++ anda/tools/kmonad/update.rhai | 4 ++ 3 files changed, 102 insertions(+) create mode 100644 anda/tools/kmonad/anda.hcl create mode 100644 anda/tools/kmonad/kmonad.spec create mode 100644 anda/tools/kmonad/update.rhai diff --git a/anda/tools/kmonad/anda.hcl b/anda/tools/kmonad/anda.hcl new file mode 100644 index 0000000000..0cf265114c --- /dev/null +++ b/anda/tools/kmonad/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "kmonad.spec" + } +} diff --git a/anda/tools/kmonad/kmonad.spec b/anda/tools/kmonad/kmonad.spec new file mode 100644 index 0000000000..e4bee0bd80 --- /dev/null +++ b/anda/tools/kmonad/kmonad.spec @@ -0,0 +1,93 @@ +%global pkg_name kmonad + +Name: %{pkg_name} +Version: 0.4.3 +Release: 1%{?dist} +Summary: An advanced keyboard manager + +License: MIT +URL: https://hackage.haskell.org/package/%{name} +Source0: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz + +BuildRequires: gcc-c++ +BuildRequires: ghc-Cabal-devel +BuildRequires: ghc-rpm-macros + +BuildRequires: ghc-base-prof +BuildRequires: ghc-cereal-prof +BuildRequires: ghc-lens-prof +BuildRequires: ghc-megaparsec-prof +BuildRequires: ghc-mtl-prof +BuildRequires: ghc-optparse-applicative-prof +BuildRequires: ghc-resourcet-prof +BuildRequires: ghc-rio-prof +BuildRequires: ghc-unliftio-devel + +BuildRequires: systemd-rpm-macros + +Packager: sadlerm + +%description +The Onion of Keyboard Management Tools, available on GNU/Linux, Windows, and MacOS! + + +%package -n ghc-%{name} +Summary: Haskell %{name} library + +%description -n ghc-%{name} +This package contains the Haskell %{name} library. + + +%package -n ghc-%{name}-devel +Summary: Haskell %{name} library development files +Requires: ghc-compiler = %{ghc_version} +Requires: ghc-%{name} = %{version}-%{release} + +%description -n ghc-%{name}-devel +This package provides the Haskell %{name} library development files. + + +%package -n ghc-%{name}-prof +Summary: Haskell %{name} profiling library +Requires: ghc-%{name}-devel = %{version}-%{release} +Supplements: (ghc-%{name}-devel and ghc-prof) + +%description -n ghc-%{name}-prof +This package provides the Haskell %{name} profiling library. + + +%prep +%autosetup + +%build +%ghc_lib_build + +%install +%ghc_lib_install +install -Dm644 startup/kmonad@.service -t %{buildroot}%{_unitdir} + + +%files +%license LICENSE +%doc README.md +%doc doc/faq.md doc/quick-reference.md +%{_bindir}/%{name} +%{_unitdir}/%{name}@.service + + +%files -n ghc-%{name} -f ghc-%{name}.files +%license LICENSE + + +%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files +%doc CONTRIBUTING.md +%doc doc/module_structure.md + + +%files -n ghc-%{name}-prof -f ghc-%{name}-prof.files + + + +%changelog +* Fri Jan 17 2025 sadlerm +- Initial package diff --git a/anda/tools/kmonad/update.rhai b/anda/tools/kmonad/update.rhai new file mode 100644 index 0000000000..c13a4a9044 --- /dev/null +++ b/anda/tools/kmonad/update.rhai @@ -0,0 +1,4 @@ +rpm.version(gh("kmonad/kmonad")); +if rpm.changed() { + rpm.release(); +}