go/macros.go

29 lines
526 B
Go

# Macros for Go module building.
#
# Copyright (c) 2011 Sascha Peilicke <saschpe@gmx.de>
#
%go_ver 0.0.r57.1+hg20110520
%go_arch GOARCH
%go_dir %{_libdir}/go
%go_sitedir %{_libdir}/go/pkg
%go_sitearch %{_libdir}/go/pkg/linux_%{go_arch}
%go_requires \
BuildRequires: go = %{go_ver}
%go_provides \
Provides: %{name}-devel \
Provides: %{name}-devel-static
%go_make \
GOROOT=%{go_dir} \
make
%go_make_install \
GOROOT=%{go_dir} \
TARGDIR=%{buildroot}%{go_sitearch} \
make install