Projects
Kolab:16:Enterprise
guam
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
guam.spec
Changed
@@ -9,8 +9,16 @@ %global guam_user guam %global guam_group guam +%if 0%{?suse_version} < 1 && 0%{?fedora} < 1 && 0%{?rhel} < 7 +%global with_systemd 0 +%else +%global with_systemd 1 +%endif + +%{!?_unitdir: %global _unitdir /usr/lib/systemd/system} + Name: guam -Version: 0.7.0 +Version: 0.7.1 Release: 1%{?dist} Summary: A Smart Reverse IMAP Proxy @@ -19,7 +27,7 @@ URL: https://kolab.org/about/guam # From 3e4a3da61124e9c79b7f7f49516e6e86aa072051 -Source0: guam-0.7.0.tar.gz +Source0: guam-0.7.1.tar.gz BuildRequires: erlang BuildRequires: erlang-eimap >= 0.1.5 @@ -35,6 +43,25 @@ Requires: erlang-goldrush Requires: erlang-lager >= 2.1.0 +%if 0%{?with_systemd} +%if 0%{?suse_version} +Requires(post): systemd +Requires(postun): systemd +Requires(preun): systemd +%else +Requires(post): systemd-units +Requires(postun): systemd-units +Requires(preun): coreutils +Requires(preun): systemd-units +%endif +%else +Requires(post): chkconfig +Requires(post): initscripts +Requires(postun): initscripts +Requires(preun): chkconfig +Requires(preun): initscripts +%endif + %description Guam is a smart, unjustly outcasted Reverse IMAP Proxy that lives at the perimeter of your IMAP environment. @@ -55,8 +82,16 @@ %{buildroot}/opt \ %{buildroot}%{_sbindir} \ %{buildroot}%{_sysconfdir}/guam/ \ +%if 0%{?with_systemd} + %{buildroot}%{_unitdir}/ \ +%endif %{buildroot}%{_var}/log/ +%if 0%{?with_systemd} +install -p -m 644 guam.service \ + %{buildroot}%{_unitdir}/guam.service +%endif + cp -a rel/%{realname} %{buildroot}/opt/. cat > %{buildroot}%{_sbindir}/guam << EOF @@ -84,18 +119,42 @@ fi %postun +%if 0%{?with_systemd} +%systemd_postun +%endif if $1 == 0 ; then /usr/sbin/userdel %{guam_user} 2>/dev/null || : /usr/sbin/groupdel %{guam_group} 2>/dev/null || : fi +%if 0%{?with_systemd} +%post +%systemd_post guam.service + +%preun +%systemd_preun guam.service + +%posttrans +test -f /etc/sysconfig/guam-disable-posttrans || \ + systemctl try-restart guam.service 2>&1 || : + +%endif + %files %attr(0750,root,root) %{_sbindir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/sys.config %attr(0640,%{guam_user},%{guam_group}) %{_var}/log/%{name}/ + +%if 0%{?with_systemd} +%{_unitdir}/%{name}.service +%endif + /opt/%{realname}/ %changelog +* Tue Feb 2 2016 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.7.1-1 +- Check in systemd init script fixes + * Mon Jan 4 2016 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.7.0-1 - Release of 0.7.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.