22 lines
613 B
Go
22 lines
613 B
Go
# Macros for Go module building.
|
|
#
|
|
# Copyright (c) 2011 Sascha Peilicke <saschpe@gmx.de>
|
|
#
|
|
|
|
%go_ver %(LC_ALL=C rpm -q --qf '%%{epoch}:%%{version}\\n' go | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
|
|
%go_arch GOARCH
|
|
|
|
%go_dir %{_libdir}/go
|
|
%go_sitedir %{_libdir}/go/pkg
|
|
%go_sitearch %{_libdir}/go/pkg/linux_%{go_arch}
|
|
|
|
%go_requires %requires_eq go
|
|
|
|
%go_provides \
|
|
Provides: %{name}-devel = %{version} \
|
|
Provides: %{name}-devel-static = %{version}
|
|
|
|
%go_make gomake
|
|
%go_make_install TARGDIR=%{buildroot}%{go_sitearch} gomake install
|
|
%go_make_test gomake test
|