Browse Source

icinga-l10n update to 1.3.0

Signed-off-by: monitorbuilder_pel7ppc64lebuilder0 <monitorbuilder@powerel.org>
master
monitorbuilder_pel7ppc64lebuilder0 6 months ago
parent
commit
12ab514030
  1. 63
      SPECS/icinga-l10n.spec

63
SPECS/icinga-l10n.spec

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
%define basedir %{_datadir}/icinga-L10n

Name: icinga-l10n
Version: 1.0.0
Version: 1.3.0
Release: 1%{?dist}
Summary: Icinga L10n
License: GPLv2+
@ -15,31 +15,84 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} @@ -15,31 +15,84 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
L10n (short for Localization) provides all translations available for Icinga.


%package selinux
Summary: Icinga L10n SELinux policy
Source100: icinga-l10n.te
Source101: icinga-l10n.fc
BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
Requires: icinga-l10n = 1.3.0
Requires: selinux-policy >= %{_selinux_policy_version}
Requires(post): policycoreutils
Requires(postun): policycoreutils
%description selinux
SELinux policy for Icinga L10n.


%prep
%setup -q -n L10n-1.0.0
%setup -q -n L10n-%{version}
mkdir SELinux
cp %{SOURCE100} SELinux/
cp %{SOURCE101} SELinux/


%build
cd 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


%install
mkdir -p %{buildroot}/%{basedir}
cp *.md %{buildroot}/%{basedir}
cp COPYING %{buildroot}/%{basedir}
cp LICENSE %{buildroot}/%{basedir}
cp -prv locale %{buildroot}/%{basedir}
find %{buildroot}/%{basedir}/locale -name *.po -delete
for selinuxvariant in mls targeted; do
install -Dpm 0644 SELinux/icinga-l10n.pp.${selinuxvariant} %{buildroot}/%{_datadir}/selinux/${selinuxvariant}/icinga-l10n.pp
done



%clean
rm -rf %{buildroot}


%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


%files
%defattr(-,root,root)
%{basedir}
%doc README.md
%doc CONTRIBUTING.md
#%doc README.md CONTRIBUTING.md
%license LICENSE


%files selinux
%{_datadir}/selinux/*/icinga-l10n.pp


%changelog

Loading…
Cancel
Save