File kubernetes-dns.spec of Package kubernetes-dns

# spec file for package kubernetes-dns
# Copyright (c) 2018 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

%define git_commit %{version}

Name:           kubernetes-dns
Version:        1.14.1
Release:        0
Summary:        DNS for Kubernetes
License:        Apache-2.0
Group:          Development/Languages/Other
Source:         %{name}-%{version}.tar.xz
BuildRequires:  golang-packaging
BuildRequires:  xz
BuildRequires:  golang(API) = 1.11
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       kube-dns = %{version}

This is the package for Kubernetes DNS.

%setup -q -n %{name}-%{version}

export GOPATH="%{_builddir}/go:$GOPATH"
GOBIN=$PWD/bin go install -tags '' -ldflags ' -X{version}'

mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_sysconfdir}/k8s/dns/dnsmasq-nanny
install -m755 bin/sidecar %{buildroot}/%{_bindir}/sidecar
install -m755 bin/kube-dns %{buildroot}/%{_bindir}/kube-dns
install -m755 bin/dnsmasq-nanny %{buildroot}/%{_bindir}/dnsmasq-nanny

%license LICENSE
%dir %{_sysconfdir}/k8s
%dir %{_sysconfdir}/k8s/dns
%dir %{_sysconfdir}/k8s/dns/dnsmasq-nanny