55f3b2acf4
strip check, it breaks on Fedora-based distros and generates a warning for SUSE-based ones. It can be removed if go binaries become really stripable OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=68
25 lines
782 B
Go
25 lines
782 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_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 gomake
|
|
%go_make_install TARGDIR=%{buildroot}%{go_sitearch} gomake install
|
|
%go_make_test gomake test
|