From f112ff3b0336526da354496c4bd600da8444bdc1 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Mon, 19 Aug 2024 00:58:35 -0700 Subject: [PATCH 1/3] add: rust-bottom (#1961) (#1963) (cherry picked from commit d8c584266071c73300278128a9ec38d74f3e7c49) Co-authored-by: Ben Woods --- anda/langs/rust/bottom/anda.hcl | 5 ++ .../rust/bottom/bottom-fix-metadata-auto.diff | 48 +++++++++++++ anda/langs/rust/bottom/rust-bottom.spec | 68 +++++++++++++++++++ anda/langs/rust/bottom/update.rhai | 1 + 4 files changed, 122 insertions(+) create mode 100644 anda/langs/rust/bottom/anda.hcl create mode 100644 anda/langs/rust/bottom/bottom-fix-metadata-auto.diff create mode 100644 anda/langs/rust/bottom/rust-bottom.spec create mode 100644 anda/langs/rust/bottom/update.rhai diff --git a/anda/langs/rust/bottom/anda.hcl b/anda/langs/rust/bottom/anda.hcl new file mode 100644 index 0000000000..ce1a0a8274 --- /dev/null +++ b/anda/langs/rust/bottom/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-bottom.spec" + } +} diff --git a/anda/langs/rust/bottom/bottom-fix-metadata-auto.diff b/anda/langs/rust/bottom/bottom-fix-metadata-auto.diff new file mode 100644 index 0000000000..7ea813b0a6 --- /dev/null +++ b/anda/langs/rust/bottom/bottom-fix-metadata-auto.diff @@ -0,0 +1,48 @@ +--- bottom-0.10.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ bottom-0.10.2/Cargo.toml 2024-08-18T14:28:49.594610+00:00 +@@ -354,15 +354,6 @@ + [target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dev-dependencies.portable-pty] + version = "0.8.1" + +-[target.'cfg(target_os = "freebsd")'.dependencies.filedescriptor] +-version = "0.8.2" +- +-[target.'cfg(target_os = "freebsd")'.dependencies.serde_json] +-version = "1.0.120" +- +-[target.'cfg(target_os = "freebsd")'.dependencies.sysctl] +-version = "0.5.5" +- + [target.'cfg(target_os = "linux")'.dependencies.rustix] + version = "0.38.34" + features = [ +@@ -370,24 +361,6 @@ + "param", + ] + +-[target.'cfg(target_os = "macos")'.dependencies.core-foundation] +-version = "0.9.4" +- +-[target.'cfg(target_os = "macos")'.dependencies.mach2] +-version = "0.4.2" +- +-[target.'cfg(target_os = "windows")'.dependencies.windows] +-version = "0.58.0" +-features = [ +- "Win32_Foundation", +- "Win32_Security", +- "Win32_Storage_FileSystem", +- "Win32_System_IO", +- "Win32_System_Ioctl", +- "Win32_System_ProcessStatus", +- "Win32_System_Threading", +-] +- + [target."cfg(unix)".dependencies.libc] + version = "0.2.155" + +@@ -402,3 +375,4 @@ + [lints.rustdoc] + broken_intra_doc_links = "deny" + missing_crate_level_docs = "deny" ++ diff --git a/anda/langs/rust/bottom/rust-bottom.spec b/anda/langs/rust/bottom/rust-bottom.spec new file mode 100644 index 0000000000..bc557d41a1 --- /dev/null +++ b/anda/langs/rust/bottom/rust-bottom.spec @@ -0,0 +1,68 @@ +# Generated by rust2rpm 26 +%bcond_without check + +%global crate bottom + +Name: rust-bottom +Version: 0.10.2 +Release: %autorelease +Summary: Customizable cross-platform graphical process/system monitor for the terminal + +License: MIT +URL: https://crates.io/crates/bottom +Source: %{crates_source} +# Automatically generated patch to strip dependencies and normalize metadata +Patch: bottom-fix-metadata-auto.diff + +BuildRequires: anda-srpm-macros +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +A customizable cross-platform graphical process/system monitor for the +terminal. Supports Linux, macOS, and Windows.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +License: MIT +Packager: Ben Woods + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%license LICENSE.dependencies +%doc README.md +%{_bindir}/btm +%{_datadir}/bash-completion/completions/btm +%{_datadir}/fish/vendor_completions.d/btm.fish +%{_datadir}/zsh/site-functions/_btm +%{_mandir}/man1/btm.1* + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online + +%build +#cargo_build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +# https://github.com/ClementTsang/bottom/blob/main/docs/content/contribution/packaging-and-distribution.md#manpage-and-completion-generation +export BTM_GENERATE=true +%cargo_install +# Completions +install -Dpm 0644 target/tmp/bottom/completion/btm.bash %{buildroot}%{_datadir}/bash-completion/completions/btm +install -Dpm 0644 target/tmp/bottom/completion/btm.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/btm.fish +install -Dpm 0644 target/tmp/bottom/completion/_btm %{buildroot}%{_datadir}/zsh/site-functions/_btm +install -Dpm 0644 target/tmp/bottom/manpage/btm.1 %{buildroot}%{_mandir}/man1/btm.1 + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/anda/langs/rust/bottom/update.rhai b/anda/langs/rust/bottom/update.rhai new file mode 100644 index 0000000000..76ec7efa2d --- /dev/null +++ b/anda/langs/rust/bottom/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("bottom")); From 84cddd19d675279cd7828f3564859623be206398 Mon Sep 17 00:00:00 2001 From: Raboneko Date: Mon, 19 Aug 2024 08:15:16 +0000 Subject: [PATCH 2/3] bump(branch): mesa-freeworld --- anda/system/mesa-freeworld/mesa-freeworld.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anda/system/mesa-freeworld/mesa-freeworld.spec b/anda/system/mesa-freeworld/mesa-freeworld.spec index 82c34c3a46..8b83d1af50 100644 --- a/anda/system/mesa-freeworld/mesa-freeworld.spec +++ b/anda/system/mesa-freeworld/mesa-freeworld.spec @@ -69,7 +69,7 @@ algorithms and decoding only VC1 algorithm. Name: %{srcname}-freeworld Summary: Mesa graphics libraries -%global ver 24.1.5 +%global ver 24.1.6 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} Release: 1%{?dist} License: MIT AND BSD-3-Clause AND SGI-B-2.0 From 5e48641f7b9d75fc494a80fdac37f1ab012dbeab Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Mon, 19 Aug 2024 11:14:30 -0700 Subject: [PATCH 3/3] add: opentabletdriver-nightly (#1968) (#1970) (cherry picked from commit 2eab51a6d1ce807406ece99e4c2242f91fe98134) Co-authored-by: madomado --- anda/system/opentabletdriver-nightly/anda.hcl | 8 ++ .../opentabletdriver-nightly.spec | 76 +++++++++++++++++++ .../opentabletdriver-nightly/update.rhai | 6 ++ 3 files changed, 90 insertions(+) create mode 100644 anda/system/opentabletdriver-nightly/anda.hcl create mode 100644 anda/system/opentabletdriver-nightly/opentabletdriver-nightly.spec create mode 100644 anda/system/opentabletdriver-nightly/update.rhai diff --git a/anda/system/opentabletdriver-nightly/anda.hcl b/anda/system/opentabletdriver-nightly/anda.hcl new file mode 100644 index 0000000000..10ae980cfb --- /dev/null +++ b/anda/system/opentabletdriver-nightly/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "opentabletdriver-nightly.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/system/opentabletdriver-nightly/opentabletdriver-nightly.spec b/anda/system/opentabletdriver-nightly/opentabletdriver-nightly.spec new file mode 100644 index 0000000000..d7fb4d6309 --- /dev/null +++ b/anda/system/opentabletdriver-nightly/opentabletdriver-nightly.spec @@ -0,0 +1,76 @@ +%global commit a60fa0cfd06148fc0c62c12fc11d9b55e15cb656 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20240819 +%global ver 0.6.4.0 + +# We aren't using Mono but RPM expected Mono +%global __requires_exclude_from ^/usr/lib/opentabletdriver/.*$ +%global __os_install_post %{nil} +%define debug_package %nil +%global dotnet_runtime_version 8.0 + +Name: opentabletdriver-nightly +Version: %ver^%commit_date.git~%shortcommit +Release: 1%?dist +Summary: Open source, cross-platform, user-mode tablet driver +License: LGPL-3.0-or-later +Conflicts: opentabletdriver + +URL: https://github.com/OpenTabletDriver/OpenTabletDriver +Source: %url/archive/%commit.tar.gz +Packager: madonuko + +BuildRequires: dotnet-sdk-%{dotnet_runtime_version} +BuildRequires: git-core jq systemd-rpm-macros + +Requires: dotnet-runtime-%{dotnet_runtime_version} +Requires: libevdev.so.2()(64bit) +Requires: gtk3 +Requires: udev +Suggests: libX11 +Suggests: libXrandr + +%description +OpenTabletDriver is an open source, cross platform, user mode tablet driver. The goal of OpenTabletDriver is to be cross platform as possible with the highest compatibility in an easily configurable graphical user interface. + +%prep +%autosetup -n OpenTabletDriver-%commit + +%build +./eng/linux/package.sh --output bin + +%install +export DONT_STRIP=1 +PREFIX="%{_prefix}" ./eng/linux/package.sh --package Generic --build false +mkdir -p "%{buildroot}" +mv ./dist/files/* "%{buildroot}"/ +rm -rf ./dist +mkdir -p "%{buildroot}/%{_prefix}/lib/" +cp -r bin "%{buildroot}/%{_prefix}/lib/opentabletdriver" + +%post +%systemd_user_post %name.service + +%preun +%systemd_user_preun %name.service + +%postun +%systemd_user_postun_with_restart %name.service + +%files +%defattr(-,root,root) +%dir %{_prefix}/lib/opentabletdriver +%dir %{_prefix}/share/doc/opentabletdriver +%{_bindir}/otd +%{_bindir}/otd-daemon +%{_bindir}/otd-gui +%{_prefix}/lib/modprobe.d/99-opentabletdriver.conf +%{_prefix}/lib/modules-load.d/opentabletdriver.conf +%{_prefix}/lib/opentabletdriver/* +%{_prefix}/lib/systemd/user/opentabletdriver.service +%{_prefix}/lib/udev/rules.d/70-opentabletdriver.rules +%{_prefix}/share/applications/opentabletdriver.desktop +%{_prefix}/share/man/man8/opentabletdriver.8.gz +%{_prefix}/share/doc/opentabletdriver/LICENSE +%{_prefix}/share/pixmaps/otd.ico +%{_prefix}/share/pixmaps/otd.png diff --git a/anda/system/opentabletdriver-nightly/update.rhai b/anda/system/opentabletdriver-nightly/update.rhai new file mode 100644 index 0000000000..aeecae129b --- /dev/null +++ b/anda/system/opentabletdriver-nightly/update.rhai @@ -0,0 +1,6 @@ +rpm.global("commit", gh_commit("OpenTabletDriver/OpenTabletDriver")); +if rpm.changed() { + rpm.global("commit_date", date()); + rpm.global("ver", gh("OpenTabletDriver/OpenTabletDriver")); + rpm.release(); +}