build deb packages using debbuild

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2022-05-19 11:12:02 -04:00
parent 49141c5c3b
commit 65e60dc0cc

View File

@ -1,24 +1,36 @@
%global built_tag v1.2.0
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
Name: slirp4netns
Version: %{gen_version}
Version: 1.2.0
%if "%{_vendor}" == "debbuild"
Packager: Lokesh Mandvekar <https://github.com/lsm5>
License: GPL-2.0+
Release: 0%{?dist}
%else
Release: %autorelease
Summary: slirp for network namespaces
License: GPLv2
%endif
Summary: slirp for network namespaces
URL: https://github.com/rootless-containers/%{name}
Source0: %{url}/archive/%{built_tag}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: go-md2man
%if "%{_vendor}" == "debbuild"
BuildRequires: git
BuildRequires: libglib2.0-dev
BuildRequires: libcap-dev
BuildRequires: libseccomp-dev
BuildRequires: libslirp-dev
%else
BuildRequires: gcc
BuildRequires: glib2-devel
BuildRequires: git
BuildRequires: go-md2man
BuildRequires: git-core
BuildRequires: libcap-devel
BuildRequires: libseccomp-devel
BuildRequires: libslirp-devel
BuildRequires: make
%endif
%description
slirp for network namespaces, without copying buffers across the namespaces.
@ -35,7 +47,7 @@ building other packages which use import path with
%{import_path} prefix.
%prep
%autosetup -Sgit -n %{name}-%{built_tag_strip}
%autosetup -Sgit
%build
./autogen.sh
@ -57,4 +69,6 @@ make DESTDIR=%{buildroot} install install-man
%{_mandir}/man1/%{name}.1.gz
%changelog
%if "%{_vendor}" != "debbuild"
%autochangelog
%endif