#define license tag if not already defined %{!?_licensedir:%global license %doc} # https://github.com/rolieup/golie %global goipath github.com/rolieup/golie %global tag v0.1.1 %gometa %global common_description %{expand: A client/server implementation of ROLIE written in GO.} %global golicenses LICENSE LICENSE.NIST %global godocs examples README.md Name: golie Version: 0.1.1 Release: 1%{?dist} Summary: A client/server implementation of ROLIE written in GO # Upstream license specification: CC0-1.0 License: CC0 URL: %{gourl} Source0: %{name}-%{version}.tar.gz BuildRequires: git # awk '{print "Provides: bundled(golang("$1")) = "$2}' go.sum | sort | grep -v go.mod$ Provides: bundled(golang(github.com/davecgh/go-spew)) = v1.1.1 Provides: bundled(golang(github.com/gocomply/scap)) = 27dcc4e20641 Provides: bundled(golang(github.com/inconshreveable/mousetrap)) = v1.0.0 Provides: bundled(golang(github.com/konsorten/go-windows-terminal-sequences)) = v1.0.1 Provides: bundled(golang(github.com/pmezard/go-difflib)) = v1.0.0 Provides: bundled(golang(github.com/sirupsen/logrus)) = v1.4.2 Provides: bundled(golang(github.com/spf13/cobra)) = v0.0.5 Provides: bundled(golang(github.com/spf13/pflag)) = v1.0.3 Provides: bundled(golang(github.com/stretchr/testify)) = v1.2.2 Provides: bundled(golang(github.com/stretchr/testify)) = v1.5.1 Provides: bundled(golang(golang.org/x/sys)) = 953cdadca894 Provides: bundled(golang(golang.org/x/text)) = v0.3.0 Provides: bundled(golang(gopkg.in/check.v1)) = 20d25e280405 Provides: bundled(golang(gopkg.in/yaml.v2)) = v2.2.2 %description %{common_description} %gopkg %prep %autosetup -Sgit -n %{name}-%{version} %build export GO111MODULE=on export GOPATH=$(pwd)/vendor:%{gopath} export GOFLAGS=-mod=vendor 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}/ install -m 0755 -vd %{buildroot}/usr/share/licenses/golie install -m 0644 -vp LICENSE* %{buildroot}/usr/share/licenses/golie install -m 0755 -vd %{buildroot}/usr/share/doc/golie/ install -m 0644 -vp README.md %{buildroot}/usr/share/doc/golie/ cp -pav examples %{buildroot}/usr/share/doc/golie/ %files %license LICENSE LICENSE.NIST %doc examples README.md %{_bindir}/* %changelog * Wed Jul 22 14:42:42 CEST 2020 Šimon Lukašík - 0.1.1-1 - Update to the latest upstram release * Thu Jul 02 19:38:12 CEST 2020 Šimon Lukašík - 0-0.1.20200702git9dd93d8 - Initial package