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-05 09:21:39 -04:00
parent 4268f1b323
commit 7326cf0baf

View File

@ -25,34 +25,20 @@
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider}.%{provider_tld}/%{project}/%{repo}
%global git0 https://%{import_path} %global git0 https://%{import_path}
%global built_tag_strip 1.10.0 %global built_tag v1.10.0
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
Name: %{repo} Name: %{repo}
Epoch: %{conditional_epoch} Epoch: %{conditional_epoch}
Version: 1.10.0 Version: %{gen_version}
%if "%{_vendor}" == "debbuild"
Packager: Podman Debbuild Maintainers <https://github.com/orgs/containers/teams/podman-debbuild-maintainers>
License: ASL-2.0+
Release: 0%{?dist}
%else
License: ASL 2.0 and BSD and ISC and MIT License: ASL 2.0 and BSD and ISC and MIT
Release: %autorelease Release: %autorelease
%endif
Summary: Inspect container images and repositories on registries Summary: Inspect container images and repositories on registries
URL: %{git0} URL: %{git0}
# Tarball fetched from upstream
Source0: %{git0}/archive/v%{built_tag_strip}.tar.gz Source0: %{git0}/archive/v%{built_tag_strip}.tar.gz
BuildRequires: go-md2man BuildRequires: go-md2man
%if "%{_vendor}" == "debbuild"
BuildRequires: git
BuildRequires: golang >= 1.18
BuildRequires: libassuan-dev
BuildRequires: libbtrfs-dev
BuildRequires: libglib2.0-dev
BuildRequires: libgpgme-dev
BuildRequires: pkg-config
BuildRequires: libdevmapper-dev
Requires: containers-common >= 4:1
%else
ExclusiveArch: %{go_arches} ExclusiveArch: %{go_arches}
BuildRequires: btrfs-progs-devel BuildRequires: btrfs-progs-devel
BuildRequires: git-core BuildRequires: git-core
@ -83,7 +69,6 @@ Provides: bundled(golang(github.com/spf13/cobra)) = v1.3.0
Provides: bundled(golang(github.com/spf13/pflag)) = v1.0.5 Provides: bundled(golang(github.com/spf13/pflag)) = v1.0.5
Provides: bundled(golang(github.com/stretchr/testify)) = v1.7.0 Provides: bundled(golang(github.com/stretchr/testify)) = v1.7.0
Provides: bundled(golang(github.com/syndtr/gocapability)) = v0.0.0_20200815063812_42c35b437635 Provides: bundled(golang(github.com/syndtr/gocapability)) = v0.0.0_20200815063812_42c35b437635
%endif
%description %description
Command line utility to inspect images and repositories directly on Docker Command line utility to inspect images and repositories directly on Docker
@ -114,7 +99,6 @@ sed -i 's/completions: bin\/%{name}/completions:/' Makefile
sed -i 's/install-docs: docs/install-docs:/' Makefile sed -i 's/install-docs: docs/install-docs:/' Makefile
%build %build
%if "%{_vendor}" != "debbuild"
%set_build_flags %set_build_flags
# These extra flags present in $CFLAGS have been skipped for now as they break the build # These extra flags present in $CFLAGS have been skipped for now as they break the build
CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-flto=auto//g') CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-flto=auto//g')
@ -124,7 +108,6 @@ CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-an
%ifarch x86_64 %ifarch x86_64
export CGO_CFLAGS="$CGO_CFLAGS -m64 -mtune=generic -fcf-protection=full" export CGO_CFLAGS="$CGO_CFLAGS -m64 -mtune=generic -fcf-protection=full"
%endif %endif
%endif
export GOPATH=$(pwd)/_build:$(pwd) export GOPATH=$(pwd)/_build:$(pwd)
export CGO_CFLAGS=$CFLAGS export CGO_CFLAGS=$CFLAGS
@ -173,6 +156,4 @@ cp -pav systemtest/* %{buildroot}/%{_datadir}/%{name}/test/system/
%{_datadir}/%{name}/test %{_datadir}/%{name}/test
%changelog %changelog
%if "%{_vendor}" != "debbuild"
%autochangelog %autochangelog
%endif