LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File kubernetes-keepalived-vip.spec of Package kubernetes-keepalived (Project home:barclaac:hackweek)

#
# 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 http://bugs.opensuse.org/
#

Name:           kubernetes-keepalived-vip
Version:	0.11
Release:	0
License:	Apache-2.0
Summary:	Keepalived adapter for Kubernetes
Url:		https://github.com/kubernetes/contrib/tree/master/keepalived-vip
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
#PreReq:
#Provides:
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{go_nostrip}
%{go_provides}

%description
Todo

%prep
%setup -q -n keepalived-vip
%define _default_patch_fuzz 5
%patch0
%patch1
%{goprep} github.com/kubernetes/contrib/keepalived-vip

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


%install
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

%post

%postun

%files
/keepalived-vip
/keepalived.tmpl
/keepalived.conf
%defattr(-,root,root)