diff --git a/.gitignore b/.gitignore index e69de29..82c89a1 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/client_golang-52186fc.tar.gz diff --git a/golang-github-prometheus-client_golang.spec b/golang-github-prometheus-client_golang.spec new file mode 100644 index 0000000..4004485 --- /dev/null +++ b/golang-github-prometheus-client_golang.spec @@ -0,0 +1,95 @@ +%global debug_package %{nil} +%global provider github +%global provider_tld com +%global project prometheus +%global repo client_golang +%global import_path %{provider}.%{provider_tld}/%{project}/%{repo} +%global commit 52186fc518809dc9a56502348751e353866b2059 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: golang-%{provider}-%{project}-%{repo} +Version: 0 +Release: 0.1.git%{shortcommit}%{?dist} +Summary: Prometheus instrumentation library for Go applications +License: ASL 2.0 +URL: https://%{import_path} +Source0: https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz +%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 +BuildArch: noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} +%endif + +%description +%{summary} + +%package devel +BuildRequires: golang >= 1.2.1-3 +BuildRequires: golang(github.com/matttproud/golang_protobuf_extensions/ext) +BuildRequires: golang(github.com/prometheus/client_model/go) +BuildRequires: golang(code.google.com/p/goprotobuf/proto) +BuildRequires: golang(github.com/bmizerany/perks/quantile) +#BuildRequires: golang(github.com/prometheus/prometheus/utility/test) +BuildRequires: golang(github.com/prometheus/procfs) +Requires: golang >= 1.2.1-3 +Requires: golang(github.com/matttproud/golang_protobuf_extensions/ext) +Requires: golang(github.com/prometheus/client_model/go) +Requires: golang(code.google.com/p/goprotobuf/proto) +Requires: golang(github.com/bmizerany/perks/quantile) +#Requires: golang(github.com/prometheus/prometheus/utility/test) +Requires: golang(github.com/prometheus/procfs) +Summary: %{summary} +Provides: golang(%{import_path}/examples/random) = %{version}-%{release} +Provides: golang(%{import_path}/examples/simple) = %{version}-%{release} +Provides: golang(%{import_path}/extraction) = %{version}-%{release} +Provides: golang(%{import_path}/model) = %{version}-%{release} +Provides: golang(%{import_path}/prometheus) = %{version}-%{release} +Provides: golang(%{import_path}/text) = %{version}-%{release} +Provides: golang(%{import_path}/_vendor/goautoneg) = %{version}-%{release} +Provides: golang(%{import_path}/_vendor/perks/histogram) = %{version}-%{release} +Provides: golang(%{import_path}/_vendor/perks/quantile) = %{version}-%{release} +Provides: golang(%{import_path}/_vendor/perks/topk) = %{version}-%{release} + +%description devel +%{summary} + +This package contains library source intended for +building other packages which use %{project}/%{repo}. + +%prep +%setup -q -n %{repo}-%{commit} + +%build + +%install +install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ +cp -rpav text %{buildroot}/%{gopath}/src/%{import_path}/ +cp -rpav prometheus %{buildroot}/%{gopath}/src/%{import_path}/ +cp -rpav model %{buildroot}/%{gopath}/src/%{import_path}/ +cp -rpav extraction %{buildroot}/%{gopath}/src/%{import_path}/ +cp -rpav examples %{buildroot}/%{gopath}/src/%{import_path}/ +cp -rpav _vendor %{buildroot}/%{gopath}/src/%{import_path}/ + +pushd %{buildroot}/%{gopath}/src/%{import_path} +rm -rf $(find . -iname .gitignore) +popd + +%check +#GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/text +#GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/prometheus +#GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/model +#GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/extraction +#GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/_vendor/perks/topk +#GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/_vendor/perks/quantile +#GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/_vendor/perks/histogram +#GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/_vendor/goautoneg + +%files devel +%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md README.md LICENSE +%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} +%{gopath}/src/%{import_path} + +%changelog +* Sat Feb 07 2015 jchaloup - 0-0.1.git52186fc +- First package for Fedora + resolves: #1190442 diff --git a/sources b/sources index e69de29..5b23dbc 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +0f05c1d918d9d5a2d5c8711cb7aa6509 client_golang-52186fc.tar.gz