%define _build_id_links none %global debug_package %{nil} Name: d2 Version: 0.7.1 Release: 1%{?dist} Summary: A modern diagram scripting language that turns text into diagrams License: MPL-2.0 URL: https://github.com/terrastruct/d2 Source0: https://github.com/terrastruct/d2/archive/refs/tags/v%{version}.tar.gz BuildRequires: golang >= 1.21 BuildRequires: git BuildRequires: make %description D2 is a modern diagram scripting language that turns text into diagrams. %prep %autosetup -c %build cd %{name}-%{version} # ensure Go modules are ready export GO111MODULE=on go mod tidy # Build executable ls -l ls -l cmd go build -v -o build/d2 ./main.go %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_docdir}/%{name} cd d2-%{version} install -m 755 build/%{name} %{buildroot}%{_bindir}/%{name} %{__install} -m 644 LICENSE.txt %{buildroot}%{_docdir}/%{name}/LICENSE.txt install -m 644 README.md %{buildroot}%{_docdir}/%{name}/README.md %check # einfacher Smoke-Test %{buildroot}%{_bindir}/%{name} --help >/dev/null || : %files %{_bindir}/%{name} %doc %{_docdir}/%{name}/README.md %license %{_docdir}/%{name}/LICENSE.txt %changelog * Wed Oct 22 2025 Christian Vonderstein - 0.7.1-1 - Initial Copr build using system Go