File quadlet.spec of Package quadlet
#
# spec file for package quadlet
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name:           quadlet
Version:        0.2.4
Release:        0
Summary:        Systemd container integration tool
License:        GPL-2.0-or-later
URL:            https://github.com/containers/quadlet
Source:         https://github.com/containers/quadlet/releases/download/%{version}/quadlet-%{version}.tar.xz
BuildRequires:  meson
BuildRequires:  gcc
BuildRequires:  pkgconfig(glib-2.0) >= 2.44.0
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  systemd-rpm-macros
BuildRequires:  pkgconfig(systemd)
Requires(pre):  shadow
Requires:       podman
Requires:       crun
Requires:       bash
%description
Quadlet is an opinionated tool for easily running podman system
containers under systemd in an optimal way.
%prep
%autosetup
%build
%meson
%meson_build
%install
%meson_install
%check
%meson_test
%pre
# We create a quadlet user so that we can get subuids and subgids allocated.
# It really is a system user, but unfortunately useradd  doesn't create subuids
# for system users, so we manually make it system-like and start at a higher
# min uid to avoid conflicts with common uid nrs around 1000
getent passwd quadlet >/dev/null || useradd -M -U -K SUB_UID_COUNT=65536 -K UID_MIN=50000 -s /sbin/nologin -d /var/lib/empty -c "User for quadlet" quadlet
%files
%license COPYING
%doc README.md
%doc docs/Fileformat.md
%doc docs/ContainerSetup.md
%{_libexecdir}/quadlet-generator
%{_systemdgeneratordir}/quadlet-system-generator
%{_systemdusergeneratordir}/quadlet-user-generator
%changelog