rpm: add user macros

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2014-10-27 21:34:09 -05:00
parent e46b13c8c7
commit 7c67f0f71a
1 changed files with 13 additions and 0 deletions

View File

@ -43,6 +43,8 @@ if [ $1 -eq 1 ] ; then \
fi \
%{nil}
%systemd_user_post() %systemd_post --user --global %{?*}
%systemd_preun() \
if [ $1 -eq 0 ] ; then \
# Package removal, not upgrade \
@ -51,10 +53,19 @@ if [ $1 -eq 0 ] ; then \
fi \
%{nil}
%systemd_user_preun() \
if [ $1 -eq 0 ] ; then \
# Package removal, not upgrade \
systemctl --no-reload --user --global disable %{?*} > /dev/null 2>&1 || : \
fi \
%{nil}
%systemd_postun() \
systemctl daemon-reload >/dev/null 2>&1 || : \
%{nil}
%systemd_user_postun() %{nil}
%systemd_postun_with_restart() \
systemctl daemon-reload >/dev/null 2>&1 || : \
if [ $1 -ge 1 ] ; then \
@ -63,6 +74,8 @@ if [ $1 -ge 1 ] ; then \
fi \
%{nil}
%systemd_user_postun_with_restart() %{nil}
%udev_hwdb_update() \
udevadm hwdb --update >/dev/null 2>&1 || : \
%{nil}