# Generated by go2rpm 1.5.0 %bcond_without check # https://git.sr.ht/~seirdy/moac %global goipath git.sr.ht/~seirdy/moac %global forgeurl https://git.sr.ht/~seirdy/moac Version: 2.0.2 %global tag v2.0.2 %global repo moac %global archivename %{repo}-%{version} %global archiveext tar.gz %global archiveurl %{forgeurl}/archive/%{tag}.%{archiveext} %global topdir %{repo}-%{tag} %global extractdir %{repo}-%{tag} %global scm git %gometa %global common_description %{expand: Generate passwords and measure their strength according to physical limits to computation.} %global golicenses LICENSE %global godocs doc README.md CONTRIBUTING.md Name: %{goname} Release: 1%{?dist} Summary: Analyze and generate passwords using physical limits of computation # Upstream license specification: MPL-2.0 License: MPLv2.0 URL: https://sr.ht/~seirdy/MOAC Source0: %{gosource} BuildRequires: scdoc BuildRequires: golang(git.sr.ht/~sircmpwn/getopt) BuildRequires: golang(golang.org/x/term) %if %{with check} # Tests BuildRequires: golang(github.com/rogpeppe/go-internal/testscript) %endif %description %{common_description} %gopkg %prep %goprep %build export LDFLAGS="-X git.sr.ht/~seirdy/moac/v2/internal/cli.version=%{version}" for cmd in cmd/* ; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install %gopkginstall export PREFIX=%{_prefix} %make_install INSTALL_ALL='install-man install-completion' install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check %gocheck -t cmd # tests version output is correct, but rpm makes it empty %endif %files %license LICENSE %doc doc README.md CONTRIBUTING.md %{_bindir}/moac %{_bindir}/moac-pwgen %{_mandir}/man1/moac.1* %{_mandir}/man1/moac-pwgen.1* %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/_moac %{_datadir}/zsh/site-functions/_moac-pwgen %gopkgfiles %changelog * Mon Oct 04 2021 Rohan Kumar - 2.0.2-1%{?dist} - Initial package