From 163f1f13e0946f7d06e7b07eba4f064b9e9aede1 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Thu, 28 Aug 2025 12:08:28 -0700 Subject: [PATCH] feat: remove %go_prep_online from all specs (#6194) (#6195) * feat: remove %go_prep_online from all specs * packager * fix: GO111MODULE=on * a * aa * aaa * hah? * feat: walker got rusted real? * fedora moment * /etc/xdg/walker/ --------- (cherry picked from commit aacc02e713a8dd37e80fc6b23a283f6f990b4104) Signed-off-by: madomado Co-authored-by: madomado --- .../golang-github-sentriz-cliphist.spec | 16 ++- .../clipse/golang-github-savedra1-clipse.spec | 18 ++-- anda/desktops/waylands/walker/anda.hcl | 2 +- .../golang-github-abenz1267-walker.spec | 81 -------------- anda/desktops/waylands/walker/update.rhai | 2 +- anda/desktops/waylands/walker/walker.spec | 78 ++++++++++++++ anda/langs/go/elephant/anda.hcl | 5 + .../golang-github-abenz1267-elephant.spec | 100 ++++++++++++++++++ anda/langs/go/elephant/update.rhai | 1 + anda/langs/go/gh-act/gh-act.spec | 3 +- .../golang-github-jesseduffield-lazygit.spec | 17 +-- anda/langs/go/prs/golang-github-dhth-prs.spec | 13 +-- anda/lib/astal/ags/ags.spec | 36 ++----- anda/tools/arduino-cli/arduino-cli.spec | 3 +- .../arduino-create-agent.spec | 5 +- .../arduino-fwuploader.spec | 5 +- .../arduino-language-server.spec | 5 +- anda/tools/arduino-lint/arduino-lint.spec | 3 +- anda/tools/pet/pet.spec | 75 +++++++++---- 19 files changed, 285 insertions(+), 183 deletions(-) delete mode 100644 anda/desktops/waylands/walker/golang-github-abenz1267-walker.spec create mode 100644 anda/desktops/waylands/walker/walker.spec create mode 100644 anda/langs/go/elephant/anda.hcl create mode 100644 anda/langs/go/elephant/golang-github-abenz1267-elephant.spec create mode 100644 anda/langs/go/elephant/update.rhai diff --git a/anda/desktops/waylands/cliphist/golang-github-sentriz-cliphist.spec b/anda/desktops/waylands/cliphist/golang-github-sentriz-cliphist.spec index 4fdb679131..42e71bcdaf 100644 --- a/anda/desktops/waylands/cliphist/golang-github-sentriz-cliphist.spec +++ b/anda/desktops/waylands/cliphist/golang-github-sentriz-cliphist.spec @@ -23,7 +23,7 @@ Wayland clipboard manager with support for multimedia.} %global godocs CHANGELOG.md readme.md version.txt Name: cliphist -Release: 2%?dist +Release: 3%?dist Summary: Wayland clipboard manager with support for multimedia Provides: golang-github-sentriz-cliphist = %version-%release Obsoletes: golang-github-sentriz-cliphist < 0.6.1-2 @@ -40,20 +40,16 @@ BuildRequires: anda-srpm-macros %prep %goprep -A %autopatch -p1 -%go_prep_online - -#if %{without bootstrap} -#generate_buildrequires -#go_generate_buildrequires -#endif %if %{without bootstrap} %build -%go_build_online +%define gomodulesmode GO111MODULE=on +mkdir -p build/bin +%gobuild -o build/bin/%name %endif %install -#gopkginstall +%gopkginstall %if %{without bootstrap} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp build/bin/%name %{buildroot}%{_bindir}/cliphist @@ -73,7 +69,7 @@ install -m 0755 -vp build/bin/%name %{buildroot}%{_bindir}/cliphist %{_bindir}/cliphist %endif -#gopkgfiles +%gopkgfiles %changelog %autochangelog diff --git a/anda/desktops/waylands/clipse/golang-github-savedra1-clipse.spec b/anda/desktops/waylands/clipse/golang-github-savedra1-clipse.spec index 5e5a464133..5df0deb132 100644 --- a/anda/desktops/waylands/clipse/golang-github-savedra1-clipse.spec +++ b/anda/desktops/waylands/clipse/golang-github-savedra1-clipse.spec @@ -24,9 +24,9 @@ Configurable TUI clipboard manager for Unix.} resources/test_data/top_secret_credentials.txt Name: clipse -Release: 2%?dist +Release: 3%?dist Summary: Configurable TUI clipboard manager for Unix -Provides: golang-github-savedra1-clipse = %version-%release +Provides: golang-github-savedra1-clipse = %evr Obsoletes: golang-github-savedra1-clipse < 1.1.0-2 Packager: madonuko License: MIT @@ -40,21 +40,17 @@ BuildRequires: anda-srpm-macros %prep %autosetup -p1 -n clipse-%version -%go_prep_online - -#if %{without bootstrap} -#generate_buildrequires -#go_generate_buildrequires -#endif +%goprep -A %if %{without bootstrap} %build mkdir -p build/bin -go build -ldflags="-linkmode=external" -o build/bin/%{name} +%define gomodulesmode GO111MODULE=on +%gobuild -o build/bin/%{name} %endif %install -#gopkginstall +%gopkginstall %if %{without bootstrap} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp build/bin/%name %{buildroot}%{_bindir}/clipse @@ -74,7 +70,7 @@ install -m 0755 -vp build/bin/%name %{buildroot}%{_bindir}/clipse %{_bindir}/clipse %endif -#gopkgfiles +%gopkgfiles %changelog %autochangelog diff --git a/anda/desktops/waylands/walker/anda.hcl b/anda/desktops/waylands/walker/anda.hcl index fa8f99b62c..8d3ea474c3 100644 --- a/anda/desktops/waylands/walker/anda.hcl +++ b/anda/desktops/waylands/walker/anda.hcl @@ -1,5 +1,5 @@ project pkg { rpm { - spec = "golang-github-abenz1267-walker.spec" + spec = "walker.spec" } } diff --git a/anda/desktops/waylands/walker/golang-github-abenz1267-walker.spec b/anda/desktops/waylands/walker/golang-github-abenz1267-walker.spec deleted file mode 100644 index 68e5ffd5ad..0000000000 --- a/anda/desktops/waylands/walker/golang-github-abenz1267-walker.spec +++ /dev/null @@ -1,81 +0,0 @@ -# Generated by go2rpm 1.14.0 -%bcond check 0 -%bcond bootstrap 0 - -%if %{with bootstrap} -%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ -%endif - -%if 0%{?fedora} <= 40 -%global debug_package %{nil} -%endif - -# https://github.com/abenz1267/walker -%global goipath github.com/abenz1267/walker -Version: 1.0.0.beta.15 - -%gometa -f - -%global common_description %{expand: -Multi-Purpose Launcher with a lot of features. Highly Customizable and fast.} - -%global golicenses LICENSE -%global godocs README.md cmd/version.txt - -Name: walker -Release: 1%?dist -Summary: Multi-Purpose Launcher with a lot of features. Highly Customizable and fast - -License: MIT -URL: %{gourl} -Source: %{gosource} -Provides: golang-github-abenz1267-walker = %version-%release -Obsoletes: golang-github-abenz1267-walker < 0.11.4-2 -Packager: madonuko -Requires: gtk4-layer-shell -BuildRequires: anda-srpm-macros -BuildRequires: gtk4-devel -BuildRequires: gtk4-layer-shell-devel -BuildRequires: gobject-introspection-devel -BuildRequires: pkgconfig(vips) - -%description %{common_description} - -%gopkg - -%prep -%goprep -A -%go_prep_online -mv {LICENSE,README.md} cmd -%setup -T -D -n %{name}-%{version}/cmd - - -%build -go build -x -o walker - -%install -#gopkginstall -%if %{without bootstrap} -install -m 0755 -vd %{buildroot}%{_bindir} -install -m 0755 -vp walker %{buildroot}%{_bindir}/walker -%endif - -%if %{without bootstrap} -%if %{with check} -%check -%gocheck -%endif -%endif - -%if %{without bootstrap} -%files -%license LICENSE -%doc README.md -%{_bindir}/walker -%endif - -#gopkgfiles - -%changelog -* Tue Dec 24 2024 madonuko - 0.11.2-1 -- Initial package diff --git a/anda/desktops/waylands/walker/update.rhai b/anda/desktops/waylands/walker/update.rhai index f71ca9aba7..f4ed6eb046 100644 --- a/anda/desktops/waylands/walker/update.rhai +++ b/anda/desktops/waylands/walker/update.rhai @@ -1 +1 @@ -rpm.version(gh("abenz1267/walker")); +rpm.global("upstream_version", gh("abenz1267/walker")); diff --git a/anda/desktops/waylands/walker/walker.spec b/anda/desktops/waylands/walker/walker.spec new file mode 100644 index 0000000000..d23cfac884 --- /dev/null +++ b/anda/desktops/waylands/walker/walker.spec @@ -0,0 +1,78 @@ +# Generated by rust2rpm 27 +%bcond check 1 + +# prevent library files from being installed +%global cargo_install_lib 0 + +%global upstream_version v1.0.0-beta-15 +%global ver %{sub %upstream_version 2} + +Name: walker +Version: %{gsub %{gsub %ver - ~ 1} - _} +Release: %autorelease +Summary: Multi-Purpose Launcher with a lot of features. Highly Customizable and fast. + +SourceLicense: GPL-3.0 +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) 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 CC0-1.0 AND ISC AND MIT AND (MIT OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND Zlib +# LICENSE.dependencies contains a full license breakdown + +URL: https://github.com/abenz1267/walker +Source: %url/archive/refs/tags/%upstream_version.tar.gz + +Packager: madonuko +Requires: elephant + +BuildRequires: cargo-rpm-macros >= 26 +BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(gtk4-layer-shell-0) +BuildRequires: pkgconfig(cairo) +BuildRequires: protobuf-compiler +BuildRequires: pkgconfig(poppler-glib) +%ifarch x86_64 +# BUG: fedora rustc missing this dep +BuildRequires: libedit(x86-64) +%endif + +%global _description %{expand: +%{summary}.} + +%description %{_description} + +%prep +%autosetup -n walker-%{ver} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install + +%define cfgdir %buildroot/etc/xdg/walker +%define themedir %cfgdir/themes/default + +install -Dm644 resources/config.toml %cfgdir/config.toml +install -Dm644 resources/themes/default/item.xml %themedir/item.xml +install -Dm644 resources/themes/default/item_calc.xml %themedir/item_calc.xml +install -Dm644 resources/themes/default/item_clipboard.xml %themedir/item_clipboard.xml +install -Dm644 resources/themes/default/item_dmenu.xml %themedir/item_dmenu.xml +install -Dm644 resources/themes/default/item_files.xml %themedir/item_files.xml +install -Dm644 resources/themes/default/item_providerlist.xml %themedir/item_providerlist.xml +install -Dm644 resources/themes/default/item_symbols.xml %themedir/item_symbols.xml +install -Dm644 resources/themes/default/layout.xml %themedir/layout.xml +install -Dm644 resources/themes/default/preview.xml %themedir/preview.xml +install -Dm644 resources/themes/default/style.css %themedir/style.css + + +%if %{with check} +%check +%cargo_test +%endif + +%files +%license LICENSE +%license LICENSE.dependencies +%doc README.md +%{_bindir}/walker +/etc/xdg/walker/ diff --git a/anda/langs/go/elephant/anda.hcl b/anda/langs/go/elephant/anda.hcl new file mode 100644 index 0000000000..d680d83d66 --- /dev/null +++ b/anda/langs/go/elephant/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "golang-github-abenz1267-elephant.spec" + } +} diff --git a/anda/langs/go/elephant/golang-github-abenz1267-elephant.spec b/anda/langs/go/elephant/golang-github-abenz1267-elephant.spec new file mode 100644 index 0000000000..ad0b0ffb56 --- /dev/null +++ b/anda/langs/go/elephant/golang-github-abenz1267-elephant.spec @@ -0,0 +1,100 @@ +# Generated by go2rpm 1.17.1 +%bcond check 1 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +%if %{with bootstrap} +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ +%endif + +%global upstream_version v1.0.0-beta-8 +%global ver %{sub %upstream_version 2} +%global providers archlinuxpkgs calc clipboard desktopapplications files menus providerlist runner symbols websearch + +# https://github.com/abenz1267/elephant +%global goipath github.com/abenz1267/elephant +Version: %{gsub %{gsub %ver - ~ 1} - _} + +%gometa -f + +%global common_description %{expand: +Elephant - cuz it's phat - is a powerful data provider service and backend for building custom application launchers and desktop utilities. It provides various data sources and actions through a plugin-based architecture, communicating via Unix sockets and Protocol Buffers. +} + +%global golicenses LICENSE +%global godocs NIX.md README.md cmd/version.txt + +Name: elephant +Release: %autorelease +Summary: None + +License: GPL-3.0-only +URL: %{gourl} +Source: %{gourl}/archive/refs/tags/%upstream_version.tar.gz + +Provides: golang-github-abenz1267-elephant = %evr +Packager: madonuko + +%description %{common_description} + +%gopkg + +%{lua: +for prov in string.gmatch(macros.providers, "%S+") do + print("%package "..prov.."\n") + print("Summary: "..prov.." provider for elephant\n") + print("\n%description "..prov.."\n"..prov.." provider for elephant.\n") + print("%files "..prov.."\n") + print("/etc/xdg/elephant/providers/"..prov..".so\n\n") +end +} + +%prep +%autosetup -n %name-%ver +%goprep -Ae +%autopatch -p1 + +%if %{without bootstrap} +%build +%define gomodulesmode GO111MODULE=on +pushd cmd +(%{gobuild -o %{gobuilddir}/bin/elephant elephant.go}) & +popd +for prov in internal/providers/*/; do + pushd $prov + (%{gobuild -buildmode=plugin}) & + popd +done +wait +%endif + +%install +%gopkginstall +%if %{without bootstrap} +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +install -Dm755 internal/providers/*/*.so -t %buildroot/etc/xdg/elephant/providers/ +%endif + +%if %{without bootstrap} +%if %{with check} +%check +%gocheck +%endif +%endif + +%if %{without bootstrap} +%files +%license LICENSE +%doc NIX.md README.md cmd/version.txt +%{_bindir}/elephant +%ghost /etc/xdg/elephant/ +%endif + +%gopkgfiles + +%changelog +%autochangelog diff --git a/anda/langs/go/elephant/update.rhai b/anda/langs/go/elephant/update.rhai new file mode 100644 index 0000000000..a81e944d08 --- /dev/null +++ b/anda/langs/go/elephant/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_rawfile("abenz1267/elephant", "master", "cmd/version.txt")); diff --git a/anda/langs/go/gh-act/gh-act.spec b/anda/langs/go/gh-act/gh-act.spec index ed09826687..1106010917 100644 --- a/anda/langs/go/gh-act/gh-act.spec +++ b/anda/langs/go/gh-act/gh-act.spec @@ -24,7 +24,7 @@ Run your GitHub Actions locally %global godocs README.md Name: gh-act -Release: 1%?dist +Release: 2%?dist Summary: None License: MIT AND ISC AND BSD-3-Clause AND Apache-2.0 AND BSD-2-Clause @@ -39,7 +39,6 @@ BuildRequires: anda-srpm-macros %prep %autosetup -p1 -n act-%{version} -%go_prep_online %if %{without bootstrap} %build diff --git a/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec b/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec index 7545bf2141..80a98cc347 100644 --- a/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec +++ b/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec @@ -13,7 +13,7 @@ Simple terminal UI for git commands.} %global godocs docs README.md VISION.md Name: golang-github-jesseduffield-lazygit -Release: 1%?dist +Release: 2%?dist Summary: Simple terminal UI for git commands License: MIT @@ -30,18 +30,12 @@ Provides: lazygit = %{version}-%{release} %gopkg %prep -%goprep -%go_prep_online +%goprep -A %build -go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \ - -ldflags "-X main.version=%{version} \ - -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \ - -compressdwarf=false -linkmode=external \ - -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now \ - -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ - -Wl,--build-id=sha1'" \ - -o %{gobuilddir}/bin/lazygit %{goipath} +%define currentgoldflags -X main.version=%version +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/lazygit %{goipath} %install install -m 0755 -vd %{buildroot}%{_bindir} @@ -51,4 +45,3 @@ install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %license LICENSE %doc docs README.md VISION.md %{_bindir}/lazygit - diff --git a/anda/langs/go/prs/golang-github-dhth-prs.spec b/anda/langs/go/prs/golang-github-dhth-prs.spec index 6c90ba3335..f84aae66d4 100644 --- a/anda/langs/go/prs/golang-github-dhth-prs.spec +++ b/anda/langs/go/prs/golang-github-dhth-prs.spec @@ -13,7 +13,7 @@ Stay updated on PRs from your terminal.} %global godocs README.md ui/assets/help.md Name: golang-github-dhth-prs -Release: %autorelease +Release: 2%?dist Summary: Stay updated on PRs from your terminal License: MIT @@ -31,16 +31,11 @@ Packager: sadlerm %prep %git_clone https://%{goipath} v%{version} -%go_prep_online +%goprep -A %build -go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \ - -ldflags "-B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \ - -compressdwarf=false -linkmode=external \ - -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now \ - -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ - -Wl,--build-id=sha1'" \ - -o %{_builddir}/bin/prs . +%define gomodulesmode GO111MODULE=on +%gobuild -o %{_builddir}/bin/prs . %install install -m 0755 -vd %{buildroot}%{_bindir} diff --git a/anda/lib/astal/ags/ags.spec b/anda/lib/astal/ags/ags.spec index 33dd2d9e69..83a419872a 100644 --- a/anda/lib/astal/ags/ags.spec +++ b/anda/lib/astal/ags/ags.spec @@ -1,4 +1,4 @@ -# Generated by go2rpm 1.15.0 +# Generated by go2rpm 1.17.1 %bcond check 0 %bcond bootstrap 0 @@ -23,46 +23,30 @@ Scaffolding CLI for Astal+TypeScript.} %global godocs docs README.md Name: ags -Release: %autorelease +Release: 2%?dist Summary: Scaffolding CLI for Astal+TypeScript License: GPL-3.0-only URL: %{gourl} Source: %{gosource} -Provides: golang-github-aylur-ags = %version-%release +Provides: golang-github-aylur-ags = %evr Packager: madonuko -BuildRequires: anda-srpm-macros %description %{common_description} %gopkg %prep -%goprep # -A -#autopatch -p1 -%go_prep_online +%goprep -A +%autopatch -p1 %build -%dnl for cmd in cmd/* ; do -%dnl go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \ -%dnl -ldflags "-X main.version=%{version} \ -%dnl -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \ -%dnl -compressdwarf=false -linkmode=external \ -%dnl -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now \ -%dnl -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ -%dnl -Wl,--build-id=sha1'" \ -%dnl -o %{gobuilddir}/bin/$(basename $cmd) $cmd -%dnl done -go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \ - -ldflags "-X main.version=%{version} \ - -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \ - -compressdwarf=false -linkmode=external \ - -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now \ - -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ - -Wl,--build-id=sha1'" \ - -o %{gobuilddir}/bin/ags . +%define currentgoldflags -X main.version=%version +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/ags . %install +%gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ @@ -80,5 +64,7 @@ install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %{_bindir}/ags %endif +%gopkgfiles + %changelog %autochangelog diff --git a/anda/tools/arduino-cli/arduino-cli.spec b/anda/tools/arduino-cli/arduino-cli.spec index 7d5748cc88..2f583cd7e8 100644 --- a/anda/tools/arduino-cli/arduino-cli.spec +++ b/anda/tools/arduino-cli/arduino-cli.spec @@ -12,7 +12,7 @@ Arduino CLI is an all-in-one solution that provides Boards/Library Managers, ske %global godocs README.md Name: arduino-cli -Release: 1%?dist +Release: 2%?dist Summary: Arduino command line tool License: GPL-3.0 Packager: Owen Zimmerman @@ -27,7 +27,6 @@ BuildRequires: anda-srpm-macros %prep %goprep -%go_prep_online %build %define gomodulesmode GO111MODULE=on diff --git a/anda/tools/arduino-create-agent/arduino-create-agent.spec b/anda/tools/arduino-create-agent/arduino-create-agent.spec index 45d90793de..31782a5314 100644 --- a/anda/tools/arduino-create-agent/arduino-create-agent.spec +++ b/anda/tools/arduino-create-agent/arduino-create-agent.spec @@ -13,7 +13,7 @@ It allows you to use the Arduino Cloud to seamlessly upload code to any USB conn %global godocs README.md Name: arduino-create-agent -Release: 1%?dist +Release: 2%?dist Summary: Arduino Cloud Agent License: AGPL-3.0 Packager: Owen Zimmerman @@ -27,8 +27,7 @@ BuildRequires: anda-srpm-macros %gopkg %prep -%goprep -%go_prep_online +%goprep -A %build sed -E '/^func Start\(/,/^\}$/s@return start\(src\)@return ""@' -i updater/updater.go diff --git a/anda/tools/arduino-fwuploader/arduino-fwuploader.spec b/anda/tools/arduino-fwuploader/arduino-fwuploader.spec index b2c156bfde..f953fd26bc 100644 --- a/anda/tools/arduino-fwuploader/arduino-fwuploader.spec +++ b/anda/tools/arduino-fwuploader/arduino-fwuploader.spec @@ -12,7 +12,7 @@ The Arduino Firmware Uploader is a tool made to update the firmware and/or add S %global godocs README.md Name: arduino-fwuploader -Release: 2%?dist +Release: 3%?dist Summary: Update the firmware and/or add SSL certificates for any Arduino board equipped with WINC or NINA Wi-Fi module License: AGPL-3.0 Packager: Owen Zimmerman @@ -27,8 +27,7 @@ BuildRequires: anda-srpm-macros python3-devel go-task %gopkg %prep -%goprep -%go_prep_online +%goprep -A %build %define gomodulesmode GO111MODULE=on diff --git a/anda/tools/arduino-language-server/arduino-language-server.spec b/anda/tools/arduino-language-server/arduino-language-server.spec index 97934e1247..48701bfdef 100644 --- a/anda/tools/arduino-language-server/arduino-language-server.spec +++ b/anda/tools/arduino-language-server/arduino-language-server.spec @@ -12,7 +12,7 @@ The Arduino Language Server is the tool that powers the autocompletion of the ne %global godocs README.md Name: arduino-language-server -Release: 1%?dist +Release: 2%?dist Summary: An Arduino Language Server based on Clangd for Arduino code autocompletion License: AGPL-3.0 Packager: Owen Zimmerman @@ -27,8 +27,7 @@ BuildRequires: anda-srpm-macros clang %gopkg %prep -%goprep -%go_prep_online +%goprep -A %build %define gomodulesmode GO111MODULE=on diff --git a/anda/tools/arduino-lint/arduino-lint.spec b/anda/tools/arduino-lint/arduino-lint.spec index 46bdd1e7c0..2d07d8a802 100644 --- a/anda/tools/arduino-lint/arduino-lint.spec +++ b/anda/tools/arduino-lint/arduino-lint.spec @@ -15,7 +15,7 @@ Arduino Lint is a command line tool that checks for common problems in Arduino p %global godocs README.md Name: arduino-lint -Release: 2%?dist +Release: 3%?dist Summary: Tool to check for problems with Arduino projects License: GPL-3.0 Packager: Owen Zimmerman @@ -31,7 +31,6 @@ BuildRequires: anda-srpm-macros %prep %goprep -%go_prep_online %build %define gomodulesmode GO111MODULE=on diff --git a/anda/tools/pet/pet.spec b/anda/tools/pet/pet.spec index 63fd89a540..ad339d43bf 100644 --- a/anda/tools/pet/pet.spec +++ b/anda/tools/pet/pet.spec @@ -1,33 +1,72 @@ -%define debug_package %nil +# Generated by go2rpm 1.17.1 +%bcond check 0 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +%if %{with bootstrap} +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ +%endif + +# https://github.com/knqyf263/pet +%global goipath github.com/knqyf263/pet +Version: 1.0.1 + +%gometa -f + +%global common_description %{expand: +Simple command-line snippet manager.} + +%global golicenses LICENSE +%global godocs doc README.md SECURITY.md Name: pet -Version: 1.0.1 -Release: 1%?dist +Release: 2%?dist Summary: Simple command-line snippet manager -URL: https://github.com/knqyf263/pet -Source0: %url/archive/refs/tags/v%version.tar.gz + License: MIT -BuildRequires: golang anda-srpm-macros +URL: %{gourl} +Source: %{gosource} + +Provides: golang-github-knqyf263-pet = %evr Packager: Owen Zimmerman - -%description -%summary + +%description %{common_description} + +%gopkg %prep -%autosetup -n pet-%version -%go_prep_online - +%goprep -A +%autopatch -p1 + %build -%go_build_online +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/pet %{goipath} %install -install -Dm755 build/bin/pet %{buildroot}%{_bindir}/pet +%gopkginstall +%if %{without bootstrap} +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +%endif +%if %{without bootstrap} +%if %{with check} +%check +%gocheck +%endif +%endif + +%if %{without bootstrap} %files %license LICENSE -%doc README.md +%doc doc README.md SECURITY.md %{_bindir}/pet - +%endif + +%gopkgfiles + %changelog -* Wed Oct 2 2024 Owen-sz - 0.9.0-1 -- package pet +%autochangelog