# Generated by go2rpm 1.2 %bcond_without check # https://github.com/facebookincubator/nvdtools %global goipath github.com/facebookincubator/nvdtools Version: 0.1.4 %gometa %global common_summary %{expand: A collection of tools for working with National Vulnerability Database feeds} %global common_description %{expand: A set of tools to work with the feeds (vulnerabilities, CPE dictionary etc.) distributed by National Vulnerability Database (NVD)} %global golicenses LICENSE %global godocs CODE_OF_CONDUCT.md CONTRIBUTING.md HOWTO.md README.md\\\ cmd/fireeye2nvd/README.md cmd/flexera2nvd/README.md\\\ cmd/idefense2nvd/README.md cmd/nvdsync/README.md\\\ cmd/rbs2nvd/README.md cmd/snyk2nvd/README.md\\\ cmd/vfeed2nvd/README.md cvss2/README.md\\\ cvss3/README.md\\\ vulndb/sqlutil/README.md Name: %{goname} Release: 1%{?dist} Summary: %{common_summary} # Upstream license specification: Apache-2.0 License: ASL 2.0 URL: %{gourl} Source0: %{gosource} # nvdtools segfaults on 32 bit architectures # https://github.com/facebookincubator/nvdtools/issues/167 ExcludeArch: i686 armv7hl BuildRequires: golang(github.com/BurntSushi/toml) BuildRequires: golang(github.com/dgrijalva/jwt-go) BuildRequires: golang(github.com/facebookincubator/flog) BuildRequires: golang(github.com/go-sql-driver/mysql) BuildRequires: golang(github.com/pkg/errors) BuildRequires: golang(github.com/spf13/cobra) BuildRequires: golang(github.com/spf13/pflag) BuildRequires: golang(golang.org/x/oauth2) BuildRequires: golang(golang.org/x/oauth2/clientcredentials) BuildRequires: golang(golang.org/x/sync/errgroup) %if %{with check} # Tests BuildRequires: golang(github.com/andreyvit/diff) BuildRequires: golang(github.com/stretchr/testify/assert) %endif %description %{common_description} %package -n nvdtools Summary: %{common_summary} %description -n nvdtools %{common_description} %gopkg %prep %goprep for cmd in cmd/* cvss2 cvss3 vulndb/sqlutil; do if [ -f $cmd/README.md ]; then mv $cmd/README.md $cmd/$(basename $cmd).md fi done %build for cmd in cmd/* vulndb/sqlutil/b64schema; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check %gocheck %endif %files -n nvdtools %license LICENSE %doc CODE_OF_CONDUCT.md CONTRIBUTING.md HOWTO.md README.md %doc cmd/*/*.md %doc cvss2/cvss2.md %doc cvss3/cvss3.md %doc vulndb/sqlutil/sqlutil.md %{_bindir}/* %gopkgfiles %changelog * Mon Jan 4 2021 Davide Cavalca - 0.1.4-1 - Initial package