diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..43f7628 --- /dev/null +++ b/go.mod @@ -0,0 +1,11 @@ +module sielink + +go 1.18 + +require ( + github.com/farsightsec/sielink v0.1.1 + github.com/golang/protobuf v1.5.0 + golang.org/x/net v0.39.0 +) + +require google.golang.org/protobuf v1.26.0-rc.1 // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..8dbfc76 --- /dev/null +++ b/go.sum @@ -0,0 +1,12 @@ +github.com/farsightsec/sielink v0.1.1 h1:eRh9/jDTyfF3YksJx5/GvbU3+oXI8JDosswfQemV4dg= +github.com/farsightsec/sielink v0.1.1/go.mod h1:PtR+AqhrW7ZC7GPJgZUrbGcaYSY4lpa6ZnZ0tcWsE5U= +github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1 h1:7QnIQpGRHE5RnLKnESfDoxm2dTapTZua5a0kS0A+VXQ= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= diff --git a/golang-github-farsightsec-sielink.spec b/golang-github-farsightsec-sielink.spec new file mode 100644 index 0000000..1581639 --- /dev/null +++ b/golang-github-farsightsec-sielink.spec @@ -0,0 +1,54 @@ +%global debug_package %{nil} + +# https://github.com/farsightsec/sielink +%global goipath github.com/farsightsec/sielink +Version: 0.1.1 + +%gometa + +%global common_description %{expand: +Implements the protocol used for communication between SIE sensors and submission servers, as well for coordination between submission servers.} + +%global golicenses LICENSE +%global godocs README.md + +Name: sielink +Release: 1%{?dist} +Summary: Sielink protocol library + +License: MPLv2.0 +URL: %{gourl} +Source0: %{gosource} + +%description +%{common_description} + +%package -n %{goname}-devel +Summary: %{summary} +BuildArch: noarch +%description -n %{goname}-devel +%{common_description} + +%prep +%setup -q + +%install +find . +for file in $(find . -iname "*.go" \! -iname "*_test.go" \! -iname "main.go" ) ; do + echo "%%dir %%{gopath}/src/%%{goipath}/$(dirname $file)" >> devel.file-list + install -d -p %{buildroot}/%{gopath}/src/%{goipath}/$(dirname $file) + cp -pav $file %{buildroot}/%{gopath}/src/%{goipath}/$file + echo "%%{gopath}/src/%%{goipath}/$file" >> devel.file-list +done +sort -u -o devel.file-list devel.file-list + +%if %{rhel} != 8 +%if %{with check} +%check +%gocheck +%endif +%endif + +%files -n %{goname}-devel -f devel.file-list + +%changelog