Name: icinga-l10n Version: 1.3.0 Release: 1%{?dist} Summary: Icinga localization Group: Applications/System License: GPLv2 URL: https://icinga.com Source0: icinga-l10n-1.3.0.tgz Source1: icinga-l10n-rpm.tgz BuildArch: noarch %description Provides all translations available for Icinga products. %prep %autosetup install -d sources cd sources tar -xzf %_topdir/SOURCES/icinga-l10n-rpm.tgz cd - cd sources/SELinux for selinuxvariant in mls targeted; do make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile mv icinga-l10n.pp icinga-l10n.pp.${selinuxvariant} make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean done cd - %install install -d %_topdir/BUILDROOT/icinga-l10n-1.3.0-1%{?dist}.%{_arch}/usr/share/icinga-L10n find . -maxdepth 1 -not -path . -not -path ./sources -exec cp -pr "{}" %_topdir/BUILDROOT/icinga-l10n-1.3.0-1%{?dist}.%{_arch}/usr/share/icinga-L10n \; for selinuxvariant in mls targeted; do install -Dpm 0644 sources/SELinux/icinga-l10n.pp.${selinuxvariant} %_topdir/BUILDROOT/icinga-l10n-1.3.0-1%{?dist}.%{_arch}/usr/share/selinux/${selinuxvariant}/icinga-l10n.pp done %files %doc README.md %license LICENSE /usr/share/icinga-L10n %package selinux Summary: Icinga L10n SELinux policy BuildRequires: checkpolicy BuildRequires: selinux-policy-devel Requires: icinga-l10n = 1.3.0-1%{?dist} Requires: selinux-policy >= %{_selinux_policy_version} Requires(post): policycoreutils Requires(postun): policycoreutils %description selinux SELinux policy for Icinga L10n. %files selinux /usr/share/selinux/*/icinga-l10n.pp %post selinux for selinuxvariant in mls targeted; do /usr/sbin/semodule -s ${selinuxvariant} -i /usr/share/selinux/${selinuxvariant}/icinga-l10n.pp &> /dev/null || true done /usr/sbin/fixfiles -R icinga-l10n restore || true for dir in /usr/share/icinga-L10n; do /usr/sbin/restorecon -R ${dir} || true done %postun selinux if [ $1 -eq 0 ]; then for selinuxvariant in mls targeted; do /usr/sbin/semodule -s ${selinuxvariant} -r icinga-l10n &> /dev/null || true done /usr/sbin/fixfiles -R icinga-l10n restore || true for dir in /usr/share/icinga-L10n; do if [ -d ${dir} ]; then /usr/sbin/restorecon -R ${dir} &> /dev/null || true fi done fi %changelog * Wed Jan 24 2024 Icinga GmbH - 1.3.0-1%{?dist} - Version 1.3.0-1