SHA256
1
0
forked from pool/courier-imap
Dominique Leuenberger 2017-03-12 19:00:40 +00:00 committed by Git OBS Bridge
commit c4baba3f2c
2 changed files with 26 additions and 10 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Feb 20 14:53:44 CET 2017 - kukuk@suse.de
- Don't call insserv if we use systemd
- Don't install LSB init scripts if we use systemd
- Create rc* links to service command if we use systemd
-------------------------------------------------------------------
Fri May 20 10:34:20 CEST 2016 - kukuk@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package courier-imap
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -146,10 +146,16 @@ install the entire Courier server.
%{__install} -D -m 644 $RPM_SOURCE_DIR/pop3.pamd %{buildroot}/etc/pam.d/pop3
%{__install} -D -m 644 $RPM_SOURCE_DIR/imap.pamd %{buildroot}/etc/pam.d/imap
# Install init scripts
%if 0%{?has_systemd}
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
%{__ln_s} -f service %{buildroot}%{_prefix}/sbin/rccourier-$i
done
%else
for i in imap imap-ssl pop pop-ssl ; do
%{__install} -D -m 0755 $RPM_SOURCE_DIR/courier-$i.init %{buildroot}/etc/init.d/courier-$i
%{__ln_s} -f /etc/init.d/courier-$i %{buildroot}%{_prefix}/sbin/rccourier-$i
done
%endif
# Install service files
%if 0%{?has_systemd}
for j in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
@ -198,15 +204,16 @@ done
%endif
%preun
%if 0%{?has_systemd}
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
%service_del_preun courier-$i.service
done
%else
%if 0%{?suse_version}
for i in imap imap-ssl pop pop-ssl; do
%stop_on_removal courier-$i
done
%endif
%if 0%{?has_systemd}
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
%service_del_preun courier-$i.service
done
%endif
if [ "$1" = "0" ]; then
%{__rm} -f %{_localstatedir}/couriersslcache
@ -222,7 +229,6 @@ fi
%post
%{_datadir}/%{name}/sysconftool `%{__cat} %{_datadir}/%{name}/configlist` >/dev/null
%if 0%{?has_systemd}
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
%service_add_post courier-$i.service
@ -230,14 +236,15 @@ done
%endif
%postun
for i in imap imap-ssl pop pop-ssl; do
%restart_on_update courier-$i
done
%insserv_cleanup
%if 0%{?has_systemd}
for i in imap imap-ssl imap-gencert pop pop-ssl pop-gencert; do
%service_del_postun courier-$i.service
done
%else
for i in imap imap-ssl pop pop-ssl; do
%restart_on_update courier-$i
done
%insserv_cleanup
%endif
%clean
@ -247,7 +254,9 @@ done
%defattr(-,root,root,755)
%doc AUTHORS libs/imap/ChangeLog COPYING* libs/imap/BUGS README README.imap README.maildirquota README.proxy
%doc README.sharedfolders
%if !0%{?has_systemd}
%attr(755,root,root) /etc/init.d/courier-*
%endif
%config %attr(644,root,root) /etc/pam.d/imap
%config %attr(644,root,root) /etc/pam.d/pop3
%dir %{_sysconfdir}/courier