File debianutils.spec of Package debianutils
#
# spec file for package debianutils
#
# Copyright (c) 2024 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: debianutils
Version: 5.20
Release: 0
Summary: Miscellaneous utilities specific to Debian
License: GPL-2.0-only
Group: System/Shells
URL: https://packages.debian.org/%{name}
Source: http://ftp.debian.org/debian/pool/main/d/%{name}/%{name}_%{version}.tar.xz
BuildRequires: automake
BuildRequires: po4a
%description
* add-shell: add a shell to /etc/shells
* ischroot: etects if it is currently running in a chroot
* run-parts: run scripts or programs in a directory
* tempfile: create a temporary file in a safe manner
* remove-shell: remove a shell to /etc/shells
* update-shells: update the list of valid login shells
%prep
%autosetup
%build
if [ ! -e configure ]; then
autoreconf -fiv
fi
%configure
%make_build
%install
%make_install
# savelog is under SMAIL license, don't install
rm %{buildroot}%{_bindir}/savelog
rm %{buildroot}%{_mandir}/*/man8/savelog.8
rm %{buildroot}%{_mandir}/man8/savelog.8
# we also don't install installkernel (Debian specific) and which.debianutils (deprecated and redundant)
rm %{buildroot}%{_sbindir}/installkernel
rm %{buildroot}%{_mandir}/*/man8/installkernel.8
rm %{buildroot}%{_mandir}/man8/installkernel.8
rm %{buildroot}%{_bindir}/which.debianutils
rm %{buildroot}%{_mandir}/*/man1/which.debianutils.1
rm %{buildroot}%{_mandir}/man1/which.debianutils.1
%find_lang add-shell --with-man
%find_lang remove-shell --with-man
%find_lang run-parts --with-man
cat add-shell.lang remove-shell.lang run-parts.lang >> %{name}.lang
%files -f %{name}.lang
%{_bindir}/ischroot
%{_bindir}/tempfile
%{_sbindir}/add-shell
%{_sbindir}/remove-shell
%{_bindir}/run-parts
%{_sbindir}/update-shells
%{_mandir}/man1/ischroot.1%{?ext_man}
%{_mandir}/man1/tempfile.1%{?ext_man}
%{_mandir}/man8/add-shell.8%{?ext_man}
%{_mandir}/man8/remove-shell.8%{?ext_man}
%{_mandir}/man8/run-parts.8%{?ext_man}
%{_mandir}/man8/update-shells.8%{?ext_man}
%dir %{_mandir}/sl
%dir %{_mandir}/sl/man8
%changelog