go/macros.go
Sascha Peilicke c9b5681d21 - Really set CFLAGS through HOST_EXTRA_CFLAGS environment variable
for building Go itself and for Go macros (used by Go packages)
- Added go-fix-werrors.patch to fix fatal compiler warnings, not
  used yet as -Wno-error is passed currently
- Adhere to SUSE patch comment conventions
- Changed %go_requires macro from '%requires_eq go' to 
  '%requires_ge go'

OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=71
2011-06-15 20:25:33 +00:00

25 lines
878 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_ge go
%go_provides \
Provides: %{name}-devel = %{version} \
Provides: %{name}-devel-static = %{version}
%go_disable_brp_strip_static_archive \
%define __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib/rpm/[^/]*/?brp-strip-static-archive %{__strip}!!g')
%go_make HOST_EXTRA_CFLAGS="%{optflags}" gomake
%go_make_install HOST_EXTRA_CFLAGS="%{optflags}" TARGDIR=%{buildroot}%{go_sitearch} gomake install
%go_make_test HOST_EXTRA_CFLAGS="%{optflags}" gomake test