From 78868a904467717964070e6dc1924edb26434b93 Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Apr 28 2019 23:17:14 +0000 Subject: Release 1.2.1 Signed-off-by: Robert-André Mauchin --- diff --git a/.gitignore b/.gitignore index 354cb8b..f1507fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /cpuid-09cded8.tar.gz +/cpuid-1.2.1.tar.gz diff --git a/golang-github-klauspost-cpuid.spec b/golang-github-klauspost-cpuid.spec index ab0df9a..59d653e 100644 --- a/golang-github-klauspost-cpuid.spec +++ b/golang-github-klauspost-cpuid.spec @@ -1,173 +1,55 @@ -# If any of the following macros should be set otherwise, -# you can wrap any of them with the following conditions: -# - %%if 0%%{centos} == 7 -# - %%if 0%%{?rhel} == 7 -# - %%if 0%%{?fedora} == 23 -# Or just test for particular distribution: -# - %%if 0%%{centos} -# - %%if 0%%{?rhel} -# - %%if 0%%{?fedora} -# -# Be aware, on centos, both %%rhel and %%centos are set. If you want to test -# rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0 condition. -# (Don't forget to replace double percentage symbol with single one in order to apply a condition) - -# 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 - +# Generated by go2rpm +%bcond_without check -%global provider github -%global provider_tld com -%global project klauspost -%global repo cpuid # https://github.com/klauspost/cpuid -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit 09cded8978dc9e80714c4d85b0322337b0a1e5e0 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -Name: golang-%{provider}-%{project}-%{repo} -Version: 1.0 -Release: 6%{?dist} -Summary: CPU feature identification for Go -# Detected licences -# - MIT/X11 (BSD like) at 'LICENSE' -License: MIT -URL: https://%{provider_prefix} -Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz - -# 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} +%global goipath github.com/klauspost/cpuid +Version: 1.2.1 +%gometa +%global common_description %{expand: +Package cpuid provides information about the CPU running the current program. -%description -%{summary} - -%if 0%{?with_devel} -%package devel -Summary: %{summary} -BuildArch: noarch +CPU features are detected on startup, and kept for fast access through the life +of the application. Currently x86 / x64 (AMD64) is supported, and no external C +(cgo) code is used, which should make the library very easy to use. +You can access the CPU information by accessing the shared CPU variable of the +cpuid library.} -Provides: golang(%{import_path}) = %{version}-%{release} -Provides: golang(%{import_path}/private) = %{version}-%{release} +%global golicenses LICENSE +%global godocs CONTRIBUTING.txt README.md -%description devel -%{summary} - -This package contains library source intended for -building other packages which use import path with -%{import_path} prefix. -%endif +Name: %{goname} +Release: 1%{?dist} +Summary: CPU feature identification for go -%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} +License: MIT +URL: %{gourl} +Source0: %{gosource} +%description +%{common_description} -%description unit-test-devel -%{summary} - -This package contains unit tests for project -providing packages with %{import_path} prefix. -%endif +%gopkg %prep -%setup -q -n %{repo}-%{commit} +%goprep -%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 +%gopkginstall +%if %{with check} %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} -%gotest %{import_path}/private +%gocheck %endif -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - - -%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 +%gopkgfiles %changelog +* Mon Apr 29 01:05:09 CEST 2019 Robert-André Mauchin - 1.2.1-1 +- Release 1.2.1 + * Fri Feb 01 2019 Fedora Release Engineering - 1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild @@ -185,4 +67,3 @@ export GOPATH=%{buildroot}/%{gopath}:%{gopath} * Tue Apr 18 2017 Matthias Runge - 1.0-1 - First package for Fedora (rhbz#1375986) - diff --git a/sources b/sources index e255702..535d838 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cpuid-09cded8.tar.gz) = 1d0288db333ff2bf09f750ca3fa8c7de3ba05506de554d7b721661352dcb8d4f3ebb2d5458858b8ec37193a8b71e16aa6ffc13ade385022c760cf65cec3083aa +SHA512 (cpuid-1.2.1.tar.gz) = d5d1cc22f6e43619dd64f86057385fb8080e85903983937be7282aed6c88a3686d7e1ce58a641ba753dacb6fcc54715343521a85cb1bdf074afbacc91b8f8ad8