From 29041f1b78a1f0ac876644affbee6c547c782523 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Aug 30 2018 20:16:04 +0000 Subject: update to spec 3.0 --- diff --git a/.gitignore b/.gitignore index 6844ef3..fe65ffb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /AudriusButkevicius-kcp-go-d17218b.tar.gz /AudriusButkevicius-kcp-go-8ae5f52.tar.gz /AudriusButkevicius-kcp-go-5d7d1a8.tar.gz +/kcp-go-5d7d1a807aa5b7817d03f6edae42d602e98487f7.tar.gz diff --git a/golang-github-AudriusButkevicius-kcp-go.spec b/golang-github-AudriusButkevicius-kcp-go.spec index d271175..3a38789 100644 --- a/golang-github-AudriusButkevicius-kcp-go.spec +++ b/golang-github-AudriusButkevicius-kcp-go.spec @@ -1,59 +1,31 @@ -# Generate devel rpm -%global with_devel 1 -# Build project from bundled dependencies -%global with_bundled 0 -# Build with debug info rpm -%global with_debug 0 -# Run tests in check section -%global with_check 1 -# Generate unit-test rpm -%global with_unit_test 1 - -%if 0%{?with_debug} -%global _dwz_low_mem_die_limit 0 -%else -%global debug_package %{nil} -%endif - -%global provider github -%global provider_tld com -%global project AudriusButkevicius -%global repo kcp-go # https://github.com/AudriusButkevicius/kcp-go -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit 5d7d1a807aa5b7817d03f6edae42d602e98487f7 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commitdate 20171227 +%global goipath github.com/AudriusButkevicius/kcp-go +%global commit 5d7d1a807aa5b7817d03f6edae42d602e98487f7 +%global date 20171227 +%gometa -Name: golang-%{provider}-%{project}-%{repo} +Name: golang-github-AudriusButkevicius-kcp-go Version: 0 -Release: 0.5.%{commitdate}.git%{shortcommit}%{?dist} +Release: 0.6%{?dist} Summary: Full-featured reliable UDP communication library License: MIT -URL: https://%{provider_prefix} -Source0: https://%{provider_prefix}/archive/%{commit}/%{project}-%{repo}-%{shortcommit}.tar.gz + +URL: %{gourl} +Source0: %{gosource} # Upstream ships a test that's broken in fedora build environments. # It exceeds the hard-coded limit of 1024 open files. Patch0: 00-disable-broken-tests.patch -# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required -ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}} -# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} - %description %{summary} -%if 0%{?with_devel} %package devel Summary: %{summary} BuildArch: noarch -%if 0%{?with_check} && ! 0%{?with_bundled} BuildRequires: golang(github.com/klauspost/reedsolomon) BuildRequires: golang(github.com/pkg/errors) BuildRequires: golang(github.com/templexxx/xor) @@ -66,129 +38,37 @@ BuildRequires: golang(golang.org/x/crypto/tea) BuildRequires: golang(golang.org/x/crypto/twofish) BuildRequires: golang(golang.org/x/crypto/xtea) BuildRequires: golang(golang.org/x/net/ipv4) -%endif - -Requires: golang(github.com/klauspost/reedsolomon) -Requires: golang(github.com/pkg/errors) -Requires: golang(github.com/templexxx/xor) -Requires: golang(github.com/tjfoc/gmsm/sm4) -Requires: golang(golang.org/x/crypto/blowfish) -Requires: golang(golang.org/x/crypto/cast5) -Requires: golang(golang.org/x/crypto/pbkdf2) -Requires: golang(golang.org/x/crypto/salsa20) -Requires: golang(golang.org/x/crypto/tea) -Requires: golang(golang.org/x/crypto/twofish) -Requires: golang(golang.org/x/crypto/xtea) -Requires: golang(golang.org/x/net/ipv4) - -Provides: golang(%{import_path}) = %{version}-%{release} %description devel %{summary} This package contains library source intended for building other packages which use import path with -%{import_path} prefix. -%endif - - -%if 0%{?with_unit_test} && 0%{?with_devel} -%package unit-test-devel -Summary: Unit tests for %{name} package - -# test subpackage tests code from devel subpackage -Requires: %{name}-devel = %{version}-%{release} - -%description unit-test-devel -%{summary} - -This package contains unit tests for project -providing packages with %{import_path} prefix. -%endif +%{goipath} prefix. %prep -%setup -q -n %{repo}-%{commit} +%gosetup -q %patch0 -p1 -%build - - %install -# source codes for building projects -%if 0%{?with_devel} -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ -echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list - -# find all *.go but no *_test.go files and generate devel.file-list -for file in $(find . \( -iname "*.go" -or -iname "*.s" \) \! -iname "*_test.go") ; do - dirprefix=$(dirname $file) - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list - - while [ "$dirprefix" != "." ]; do - echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >> devel.file-list - dirprefix=$(dirname $dirprefix) - done -done -%endif - -# testing files for this project -%if 0%{?with_unit_test} && 0%{?with_devel} -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ - -# find all *_test.go files and generate unit-test-devel.file-list -for file in $(find . -iname "*_test.go") ; do - dirprefix=$(dirname $file) - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test-devel.file-list - - while [ "$dirprefix" != "." ]; do - echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >> devel.file-list - dirprefix=$(dirname $dirprefix) - done -done -%endif - -%if 0%{?with_devel} -sort -u -o devel.file-list devel.file-list -%endif +%goinstall %check -%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel} -export GOPATH=%{buildroot}/%{gopath}:%{gopath} - -%if ! 0%{?gotest:1} -%global gotest go test -%endif - -%gotest %{import_path} -%endif - - -#define license tag if not already defined -%{!?_licensedir:%global license %doc} +%gochecks -%if 0%{?with_devel} %files devel -f devel.file-list %license LICENSE %doc README.md -%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} -%endif - -%if 0%{?with_unit_test} && 0%{?with_devel} -%files unit-test-devel -f unit-test-devel.file-list -%license LICENSE -%doc README.md -%endif %changelog +* Thu Aug 30 2018 Fabio Valentini - 0-0.6.20171227git5d7d1a8 +- Update to use spec 3.0. + * Fri Jul 13 2018 Fedora Release Engineering - 0-0.5.20171227.git5d7d1a8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 487a028..611d18e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (AudriusButkevicius-kcp-go-5d7d1a8.tar.gz) = 74aa62e89fd95e040556470d6f725a701bf8f6e2427663b79755533c1b65e06f1dc6b88f563f32566662b78fdcfda449d2645f18c5962ed667e4becb679cbaff +SHA512 (kcp-go-5d7d1a807aa5b7817d03f6edae42d602e98487f7.tar.gz) = 74aa62e89fd95e040556470d6f725a701bf8f6e2427663b79755533c1b65e06f1dc6b88f563f32566662b78fdcfda449d2645f18c5962ed667e4becb679cbaff