File kubernetes-keepalived-vip.spec of Package kubernetes-keepalived

# spec file for package kubernetes-keepalived
# Copyright (c) 2017 SUSE LINUX Products 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:           kubernetes-keepalived-vip
Version:	0.11
Release:	0
License:	Apache-2.0
Summary:	Keepalived adapter for Kubernetes
Group:		System/Management
Source:		keepalived-vip-0.11.tar.gz
Source1:        kubernetes-keepalived-vip-rpmlintrc
Patch0:		keepalived-delay.diff
Patch1:		keepalived-watch.diff
BuildRequires:  go >= 1.8.3
BuildRequires:  golang-packaging
BuildRequires:  golang(API) = 1.8
BuildRoot:      %{_tmppath}/%{name}-%{version}-build


%setup -q -n keepalived-vip
%define _default_patch_fuzz 5

export GOPATH="%{_builddir}/go:$GOPATH"
GOBIN=$PWD/bin CGO_ENABLED=0 GOOS=linux go build -o keepalived-vip

install -m755 $RPM_BUILD_DIR/keepalived-vip/keepalived-vip $RPM_BUILD_ROOT/keepalived-vip
install -m644 $RPM_BUILD_DIR/keepalived-vip/keepalived.tmpl $RPM_BUILD_ROOT/keepalived.tmpl
install -m644 $RPM_BUILD_DIR/keepalived-vip/keepalived.conf $RPM_BUILD_ROOT/keepalived.conf