Compare commits

...

1 Commits
master ... f18

Author SHA1 Message Date
rhatdan 87f58c2bec Use systemd post install scriplets 2012-09-17 12:34:10 -04:00
1 changed files with 11 additions and 15 deletions

View File

@ -1,7 +1,7 @@
Summary: SELinux Translation Daemon
Name: mcstrans
Version: 0.3.3
Release: 5%{?dist}
Release: 6%{?dist}
License: GPL+
Group: System Environment/Daemons
Source: http://fedora.redhat.com/projects/%{name}-%{version}.tgz
@ -12,8 +12,9 @@ BuildRequires: libselinux-devel >= 1.30.3-1
BuildRequires: libcap-devel pcre-devel libsepol-devel libsepol-static
BuildRequires: systemd-units
Requires: pcre
Requires(pre): systemd-units
Requires(post):systemd-units
Requires(preun): systemd-units
Requires(postun):systemd-units
Provides: setransd
Provides: libsetrans
Obsoletes: libsetrans
@ -59,22 +60,14 @@ rm -rf %{buildroot}/%{_sysconfdir}/rc.d/init.d/mcstrans
%clean
rm -rf %{buildroot}
%post
if [ $1 -eq 1 ] ; then
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%post
%systemd_post mcstransd.service
%preun
if [ $1 -eq 0 ]; then
/usr/bin/systemctl --no-reload mcstransd.service >/dev/null 2>&1 || :
/usr/bin/systemctl stop mcstransd.service > /dev/null 2>&1 || :
fi
%systemd_preun mcstransd.service
%postun
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ]; then
/usr/bin/systemctl try-restart mcstransd.service >/dev/null 2>&1 || :
fi
%postun
%systemd_postun_with_restart mcstransd.service
%files
%defattr(-,root,root,0755)
@ -96,6 +89,9 @@ fi
%{_usr}/share/mcstrans/util/*
%changelog
* Mon Sep 16 2012 Dan Walsh <dwalsh@redhat.com> - 0.3.3-5
- Fix ot use systemd macros
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild