From b9f328a87f7624407430a9ebe8c8c64c61164bdc Mon Sep 17 00:00:00 2001 From: madomado Date: Thu, 16 Jan 2025 00:16:16 +0800 Subject: [PATCH] add: eww (#2921) * add: eww * aslkdfj * as;dklfj Signed-off-by: madomado --------- Signed-off-by: madomado (cherry picked from commit 42662003e9e6b110f7db31e7ef7d7798b6ab3353) --- anda/desktops/waylands/eww/anda.hcl | 5 ++ anda/desktops/waylands/eww/eww.spec | 89 ++++++++++++++++++++++++++ anda/desktops/waylands/eww/update.rhai | 6 ++ 3 files changed, 100 insertions(+) create mode 100644 anda/desktops/waylands/eww/anda.hcl create mode 100644 anda/desktops/waylands/eww/eww.spec create mode 100644 anda/desktops/waylands/eww/update.rhai diff --git a/anda/desktops/waylands/eww/anda.hcl b/anda/desktops/waylands/eww/anda.hcl new file mode 100644 index 0000000000..070bf0a2cf --- /dev/null +++ b/anda/desktops/waylands/eww/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "eww.spec" + } +} diff --git a/anda/desktops/waylands/eww/eww.spec b/anda/desktops/waylands/eww/eww.spec new file mode 100644 index 0000000000..77b52b948b --- /dev/null +++ b/anda/desktops/waylands/eww/eww.spec @@ -0,0 +1,89 @@ +# Generated by rust2rpm 27 +%global commit 593a4f4666f0bc42790d6d033e64a2b38449090f +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250115 +%global ver 0.6.0 +%bcond check 0 + +Name: eww +Version: %ver^%commit_date.git~%shortcommit +Release: %autorelease +Summary: Widgets for everyone! + +SourceLicense: MIT +License: MIT + +URL: https://elkowar.github.io/eww +Source0: https://github.com/elkowar/eww/archive/%commit.tar.gz + +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: anda-srpm-macros +BuildRequires: pkgconfig(dbusmenu-gtk3-0.4) +BuildRequires: pkgconfig(gtk-layer-shell-0) +Requires: (%name-x11 or %name-wayland) + +%global _description %{expand: +Widgets for everyone!.} + +%description %{_description} + +%package x11 +Summary: eww for x11 +Conflicts: eww-wayland +SourceLicense: MIT +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND ISC AND LGPL-3.0-only AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) +RemovePathPostFixes: .x11 + +%description x11 %{_description} + +%package wayland +Summary: eww for wayland +Conflicts: eww-x11 +SourceLicense: MIT +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND ISC AND LGPL-3.0-only AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) +RemovePathPostFixes: .wayland + +%description wayland %{_description} + +%prep +%autosetup -n eww-%{commit} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online -n -f x11} +%{cargo_license_online -n -f x11} > LICENSE.dependencies.x11 +%{cargo_license_summary_online -n -f wayland} +%{cargo_license_online -n -f wayland} > LICENSE.dependencies.wayland +%cargo_build -n -f x11 +mv target/rpm/eww target/rpm/eww.x11 +mv target/rpm/eww.d target/rpm/eww.d.x11 +%cargo_build -n -f wayland +mv target/rpm/eww target/rpm/eww.wayland +mv target/rpm/eww.d target/rpm/eww.d.wayland + +%install +install -Dpm755 target/rpm/eww.* -t %buildroot%_bindir + +%if %{with check} +%check +%cargo_test +%endif + +%files +%license LICENSE +%doc CHANGELOG.md +%doc README.md +%doc YUCK_MIGRATION.md + +%files x11 +%license LICENSE.dependencies.x11 +%{_bindir}/eww.x11 +%{_bindir}/eww.d.x11 + +%files wayland +%license LICENSE.dependencies.wayland +%{_bindir}/eww.wayland +%{_bindir}/eww.d.wayland + +%changelog +%autochangelog diff --git a/anda/desktops/waylands/eww/update.rhai b/anda/desktops/waylands/eww/update.rhai new file mode 100644 index 0000000000..4ccc7c3399 --- /dev/null +++ b/anda/desktops/waylands/eww/update.rhai @@ -0,0 +1,6 @@ +rpm.global("commit", gh_commit("elkowar/eww")); +if rpm.changed() { + rpm.global("ver", gh("elkowar/eww")); + rpm.global("commit_date", date()); + rpm.release(); +}