# Generated by go2rpm 1.15.0 # Tests fail to build with # ./instances.go:342:46: non-constant format string in call to github.com/arduino/arduino-cli/vendor/google.golang.org/grpc/status.Newf %bcond check 0 # https://github.com/arduino/arduino-cli %global goipath github.com/arduino/arduino-cli Version: 1.1.1 # The following should be generated from a git checkout, with TAG="v%%{version}" # git show -s --format=%H $TAG %global version_commit fa6eafcbbea301eeece900f0501e88d288487974 # date -d @$(git show --no-patch --format=%ct $TAG) +"%Y-%m-%dT%H:%M:%SZ" %global version_date 2024-11-22T00:56:36Z %gometa -L -f %global common_description %{expand: Arduino CLI is an all-in-one solution that provides Boards/Library Managers, sketch builder, board detection, uploader, and many other tools needed to use any Arduino compatible board and platform from command line or machine interfaces.} Name: arduino-cli Release: %autorelease Summary: Arduino command line tool # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-3.0-only AND ISC AND LGPL-2.1-only AND LGPL-3.0-only AND MIT AND MPL-2.0 URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml # The vendored copy of bufpipe is missing the license file, so fetch it from upstream Source3: https://github.com/acomagu/bufpipe/raw/master/LICENSE BuildRequires: go-vendor-tools BuildRequires: sed %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} cp -p %SOURCE3 vendor/github.com/acomagu/bufpipe/ # Disable update notification sed -i internal/cli/configuration/defaults.go \ -e 's/"updater.enable_notification", true/"updater.enable_notification", false/' %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build export GO_LDFLAGS="-X github.com/arduino/arduino-cli/version.versionString=%{version} -X github.com/arduino/arduino-cli/version.commit=%{version_commit} -X github.com/arduino/arduino-cli/version.date=%{version_date}" %gobuild -o %{gobuilddir}/bin/arduino-cli %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %check %go_vendor_license_check -c %{S:2} %if %{with check} %gocheck %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs %doc README.md %{_bindir}/arduino-cli %changelog %autochangelog