build deb packages using debbuild

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2022-05-27 09:32:23 -04:00
parent 7a9daf871b
commit 99772abf9b

View File

@ -3,24 +3,34 @@
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"}) %global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
Name: catatonit Name: catatonit
Version: %{gen_version} Version: 0.1.7
Release: %autorelease
Summary: A signal-forwarding process manager for containers Summary: A signal-forwarding process manager for containers
%if "%{_vendor}" == "debbuild"
Maintainer: Lokesh Mandvekar <lsm5@fedoraproject.org>
License: GPL-3.0+
Release: 0%{?dist}
%else
License: GPLv3+ License: GPLv3+
Release: %autorelease
%endif
URL: https://github.com/openSUSE/catatonit URL: https://github.com/openSUSE/catatonit
Source0: %{url}/archive/%{built_tag}.tar.gz Source0: %{url}/archive/%{built_tag}.tar.gz
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: file BuildRequires: file
BuildRequires: gcc
BuildRequires: git
BuildRequires: glibc-static
BuildRequires: libtool BuildRequires: libtool
BuildRequires: make
Provides: podman-%{name} = %{version}-%{release} Provides: podman-%{name} = %{version}-%{release}
%if "%{_vendor}" == "debbuild"
BuildRequires: git
%else
BuildRequires: gcc
BuildRequires: git-core
BuildRequires: glibc-static
BuildRequires: make
%endif
%description %description
Catatonit is a /sbin/init program for use within containers. It Catatonit is a %{_sbindir}/init program for use within containers. It
forwards (almost) all signals to the spawned child, tears down forwards (almost) all signals to the spawned child, tears down
the container when the spawned child exits, and otherwise the container when the spawned child exits, and otherwise
cleans up other exited processes (zombies). cleans up other exited processes (zombies).
@ -30,12 +40,13 @@ This is a reimplementation of other container init programs (such as
signalfd(2)) and has no additional features. signalfd(2)) and has no additional features.
%prep %prep
%autosetup -Sgit -n %{name}-%{built_tag_strip} %autosetup -Sgit
sed -i '$d' configure.ac sed -i '$d' configure.ac
%build %build
autoreconf -fi autoreconf -fi
%configure %configure
CFLAGS="%{optflags} -fPIE -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
%{__make} %{?_smp_mflags} %{__make} %{?_smp_mflags}
# Make sure we *always* build a static binary. Otherwise we'll break containers # Make sure we *always* build a static binary. Otherwise we'll break containers
@ -61,4 +72,6 @@ ln -s %{_libexecdir}/%{name}/%{name} %{buildroot}%{_libexecdir}/podman/%{name}
%{_libexecdir}/podman/%{name} %{_libexecdir}/podman/%{name}
%changelog %changelog
%if "%{_vendor}" != "debbuild"
%autochangelog %autochangelog
%endif