# 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/Aylur/ags
%global goipath         github.com/Aylur/ags
Version:                3.1.2

%gometa -f

%global common_description %{expand:
Scaffolding CLI for Astal+TypeScript.}

%global golicenses      LICENSE
%global godocs          docs README.md

Name:           ags
Release:        1%{?dist}
Summary:        Scaffolding CLI for Astal+TypeScript

License:        GPL-3.0-only
URL:            %{gourl}
Source:         %{gosource}
Provides:       golang-github-aylur-ags = %evr
Packager:       madonuko <mado@fyralabs.com>

%description %{common_description}

%gopkg

%prep
%goprep -A
%autopatch -p1

%build
cd cli
%define currentgoldflags -X main.version=%version
%define gomodulesmode GO111MODULE=on
%gobuild -o %{gobuilddir}/bin/ags .

%install
cd cli
%gopkginstall
install -m 0755 -vd                     %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/

%if %{without bootstrap}
%if %{with check}
%check
%gocheck
%endif
%endif

%if %{without bootstrap}
%files
%license LICENSE
%doc docs README.md
%{_bindir}/ags
%endif

%gopkgfiles

%changelog
%autochangelog
