remove debbuild macros to comply with Fedora guidelines

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2022-10-10 10:46:32 -04:00
parent 8b37473438
commit 8308fd6dc1

View File

@ -1,12 +1,4 @@
%if "%{_vendor}" == "debbuild"
%define gobuild(o:) GO111MODULE=off go build -buildmode pie -tags=" ${BUILDTAGS:-}" -a -v -x %{?**};
%endif
%if 0%{?fedora}
%global with_debug 1
%else
%global with_debug 0
%endif
%if 0%{?with_debug}
%global _find_debuginfo_dwz_opts %{nil}
@ -22,40 +14,29 @@
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo}
%global git0 https://%{import_path}
%global built_tag_strip 1.1.1
%global built_tag v1.1.1
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
Name: %{project}-%{repo}
Version: 1.1.1
%if "%{_vendor}" == "debbuild"
Packager: Podman Debbuild Maintainers <https://github.com/orgs/containers/teams/podman-debbuild-maintainers>
License: ASL-2.0+
Release: 0%{?dist}
%else
Release: %autorelease
License: ASL 2.0 and BSD and MIT
%endif
Summary: Libraries for writing CNI plugin
URL: %{git0}
Source0: %{git0}/archive/v%{built_tag_strip}.tar.gz
# Tarball fetched from upstream
Source0: %{url}/archive/%{built_tag}.tar.gz
BuildRequires: golang >= 1.16.6
%if "%{_vendor}" == "debbuild"
BuildRequires: libsystemd-dev
%else
BuildRequires: systemd-devel
%if 0%{?fedora} || 0%{?rhel} >= 9
BuildRequires: go-rpm-macros
%endif
%endif
BuildRequires: go-md2man
Requires: systemd
Obsoletes: %{project}-cni < 0.7.1-2
Provides: %{project}-cni = %{version}-%{release}
Provides: kubernetes-cni
Provides: container-network-stack = 1
# vendored libraries
# awk '{print "Provides: bundled(golang("$1")) = "$2}' go.mod | sort | uniq | sed -e 's/-/_/g' -e '/bundled(golang())/d' -e '/bundled(golang(go\|module\|replace\|require))/d'
%if "%{_vendor}" != "debbuild"
Provides: bundled(golang(github.com/Microsoft/go_winio)) = v0.4.17
Provides: bundled(golang(github.com/Microsoft/hcsshim)) = v0.8.20
Provides: bundled(golang(github.com/alexflint/go_filemutex)) = v1.1.0
@ -81,7 +62,6 @@ Provides: bundled(golang(github.com/safchain/ethtool)) = v0.0.0_20210803160452_9
Provides: bundled(golang(github.com/sirupsen/logrus)) = v1.8.1
Provides: bundled(golang(github.com/vishvananda/netlink)) = v1.1.1_0.20210330154013_f5de75959ad5
Provides: bundled(golang(github.com/vishvananda/netns)) = v0.0.0_20210104183010_2eb08e3e575f
%endif
%description
The CNI (Container Network Interface) project consists of a specification
@ -139,6 +119,4 @@ install -p plugins/ipam/dhcp/systemd/cni-dhcp.socket %{buildroot}%{_unitdir}
%{_unitdir}/cni-dhcp.socket
%changelog
%if "%{_vendor}" != "debbuild"
%autochangelog
%endif