File go-gozmq.spec of Package go-gozmq
#
# spec file for package go-gozmq
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Sascha Peilicke <saschpe@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: go-gozmq
Version: 0.0.0+git20140623.d1b01a2
Release: 0
Summary: Go bindings for ZeroMQ
License: Apache-2.0
Group: Development/Languages/Other
Url: http://github.com/alecthomas/gozmq
Source: gozmq-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: go-devel
BuildRequires: pkg-config
BuildRequires: zeromq-devel
Requires: zeromq-devel
%{go_provides}
%{go_requires}
%{go_recommends}
%description
Go bindings for the ZeroMQ library.
%godoc_package
%prep
%setup -q -n gozmq-%{version}
# 12.3+ has zeromq 3.x and 12.2- has zeromq 2.1.
# zmq_3_x_test.go used zeromq 3.x specific functions;
# zmq_test.go used zeromq 2.x (but not 2.1 only)
# specific functions.
%if 0%{?suse_version} >= 1230
rm zmq_test.go
%else
rm zmq_3_x_test.go zmq_test.go
%endif
# The following tests need access to a running zeromq:
rm gozmqgen/main_test.go
%build
%goprep github.com/alecthomas/gozmq
# manual build
export IMPORTPATH="github.com/alecthomas/gozmq"
export BUILDFLAGS="-s -v -p 4 -x"
export GOPATH=%{_builddir}/go:%{_libdir}/go/contrib
%if 0%{?suse_version} >= 1230
%if 0%{?suse_version} > 1315
go get --tags zmq_4_x $BUILDFLAGS $IMPORTPATH
%else
go get --tags zmq_3_x $BUILDFLAGS $IMPORTPATH
%endif
%else
go get --tags zmq_2_1 $BUILDFLAGS $IMPORTPATH
%endif
%install
%goinstall
%godoc
%check
%gotest github.com/alecthomas/gozmq
%files
%defattr(-,root,root,-)
%doc AUTHORS README.md
%{go_contribdir}/*
%files doc
%defattr(-,root,root,-)
%{go_contribsrcdir}/*
%changelog