# Don't attempt to build and debug files/packages %global debug_package %{nil} # Run tests in check section %bcond_without check %global goname compliance-masonry %global goipath github.com/opencontrol/compliance-masonry %global common_description %{expand: Compliance Masonry is a command-line interface (CLI) that allows users to construct certification documentation using the OpenControl Schema.} Version: 1.1.5 %gometa Name: %{goname} Release: 1%{?dist} Summary: Security Documentation Builder License: CC0 URL: %{gourl} Source0: %{gosource} # Fedora's version of spf13 is several months outdated # and is missing DisableFlagsInUseLine. This patch # comments out the option until Fedora releases # spf13. Request for latest version of cobra can be seen # at https://bugzilla.redhat.com/show_bug.cgi?id=1616082 Patch0: unavailable_command_option.patch BuildRequires: golang(github.com/Masterminds/vcs) BuildRequires: golang(github.com/blang/semver) BuildRequires: golang(github.com/spf13/cobra) BuildRequires: golang(github.com/onsi/ginkgo) BuildRequires: golang(github.com/onsi/gomega) BuildRequires: golang(github.com/spf13/cobra) BuildRequires: golang(github.com/stretchr/testify/mock) BuildRequires: golang(github.com/tg/gosortmap) BuildRequires: golang(vbom.ml/util) BuildRequires: golang(github.com/fatih/set) BuildRequires: golang(gopkg.in/yaml.v2) %description %{common_description} %prep rm -fr vendor %forgesetup %patch0 -p1 %build %gobuildroot for cmd in cmd/* ; do %gobuild -o _bin/$(basename $cmd) %{goipath}/$cmd done %install install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp _bin/* %{buildroot}%{_bindir}/ %if %{with check} %check # Disable checks in the tools/vcs dirs/subdirs. # These checks require a network connection to test # valid git repos, and then, download them. These # tests will never be disabled upstream as it is # required for code functionality. Also, see # https://fedoraproject.org/wiki/More_Go_packaging#When_to_exclude # for reason to exclude tests. %gochecks -r pkg/cli/get/resources -r tools/vcs %endif %files %license LICENSE.md %doc *\.md %{_bindir}/masonry %{_bindir}/%{name} %changelog * Thu Aug 16 2018 Gabe - 1.1.5-1 - First package for Fedora