File golang-packaging.spec of Package golang-packaging.2145

# spec file for package golang-packaging
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           golang-packaging
Version:        14.6
Release:        0
Summary:        A toolchain to help packaging golang
License:        GPL-3.0
Group:          Development/Languages/Golang
Url:  {name}
BuildRequires:  rpm
BuildRequires:  ruby
Requires:       go
Requires:       ruby
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

A toolchain to help packaging golang, written in ruby.

%setup -q
GOARCH=`ruby ./golang-macros.rb --arch`
sed -i "s/GOARCH/$GOARCH/" macros.go


mkdir -p %{buildroot}%{_sysconfdir}/rpm/
mkdir -p %{buildroot}%{_prefix}/lib/rpm/
%if 0%{?suse_version} >= 1320
mkdir -p %{buildroot}%{_prefix}/lib/rpm/fileattrs
install -m0644 golang.attr %{buildroot}%{_prefix}/lib/rpm/fileattrs/
install -m0755 golang.prov %{buildroot}%{_prefix}/lib/rpm/
install -m0755 golang.req %{buildroot}%{_prefix}/lib/rpm/
cp -r golang %{buildroot}%{_prefix}/lib/rpm/
install -m0755 golang-macros.rb %{buildroot}%{_prefix}/lib/rpm/
install -m0644 macros.go %{buildroot}%{_sysconfdir}/rpm/

%doc COPYING ChangeLog
%config %{_sysconfdir}/rpm/macros.go
%if %{?suse_version} >= 1320

openSUSE Build Service is sponsored by