+#
+# Conditional build:
+%bcond_without src # build devel package with sources
+%bcond_without tests # build without tests
+
+%define pkgname template
Summary: -
Summary(pl.UTF-8): -
-Name: go-package
+Name: golang-github-template-%{pkgname}
Version: _
Release: 0.1
License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
-Group: Applications
+Group: Libraries
Source0: %{name}-%{version}.tar.gz
# Source0-md5: -
URL: -
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _enable_debug_packages 0
+%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
+%define gopath %{_libdir}/golang
+%define import_path github.com/russross/%{pkgname}
%description
A package written in go language
-%description -l pl.UTF-8
+%package devel
+Summary: %{summary}
+Group: Development/Languages
+#Requires: golang(github.com/../...)
+Provides: golang(%{import_path}) = %{version}-%{release}
+# noarch subpackages only when building with rpm5
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
+
+%description devel
+%{summary}
+
+This package contains library source intended for building other
+packages which use import path with %{import_path} prefix.
%prep
%setup -q