## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.15.0 %bcond check 1 # https://github.com/terrastruct/d2 %global goipath oss.terrastruct.com/d2 %global forgeurl https://github.com/terrastruct/d2 Version: 0.6.9 %gometa -L -f %global common_description %{expand: D2 is a modern diagram scripting language that turns text to diagrams.} Name: d2 Release: %autorelease Summary: Modern diagram scripting language that turns text to diagrams # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND FTL AND ISC 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 BuildRequires: go-vendor-tools %if %{with check} BuildRequires: git-core %endif %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %gobuild -o %{gobuilddir}/bin/d2 %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -Dpm0644 -t %{buildroot}%{_mandir}/man1 ci/release/template/man/d2.1 %check %go_vendor_license_check -c %{S:2} %if %{with check} # Disable d2cli as it fails with: # ./play.go:63:32: non-constant format string in call to oss.terrastruct.com/d2/vendor/oss.terrastruct.com/util-go/xmain.UsageErrorf # Disable e2e tests as they require Internet access # This is too coarse, we should only disable tests that trigger playwright # installation (i.e. those converting to png) %gocheck -t oss.terrastruct.com/d2/d2cli -t e2etests-cli %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs README.md %{_bindir}/d2 %{_mandir}/man1/d2.1* %changelog ## START: Generated by rpmautospec * Wed Feb 26 2025 Davide Cavalca - 0.6.9-1 - Update to 0.6.9; Fixes: RHBZ#2347641 * Tue Feb 25 2025 Davide Cavalca - 0.6.8-1 - Initial import; Fixes: RHBZ#2333284 ## END: Generated by rpmautospec