This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/build-main in repository x2goserver. commit 6f0dd8819605249283f7711bf19910c9b9a82d73 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Mar 5 04:03:01 2015 +0100 x2goserver.spec: add support for %{_datadir}/applications symlink in %{_sysconfdir}/x2go. - Add creation and deletion bits to %post and %preun scriptlets. - Refactor %post, %pre, %postun and %preun scriptlets to accommodate for last change. --- debian/changelog | 4 ++++ x2goserver.spec | 36 ++++++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1323aca..5a7ffcf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -138,6 +138,10 @@ x2goserver (4.0.1.19-0x2go1) unstable; urgency=medium * x2goserver.spec: - Do not search for unavailable file in x2goserver's post install script. Fixes installation bugs reported by Michael DePaulo. + - Add support for %{_datadir}/applications symlink in %{_sysconfdir}/x2go. + + Add creation and deletion bits to %post and %preun scriptlets. + + Refactor %post, %pre, %postun and %preun scriptlets to accommodate for + last change. -- X2Go Release Manager <git-admin@x2go.org> Tue, 24 Feb 2015 21:49:22 +0100 diff --git a/x2goserver.spec b/x2goserver.spec index 66f3228..9579297 100644 --- a/x2goserver.spec +++ b/x2goserver.spec @@ -392,37 +392,49 @@ fi %endif %endif +# create /etc/x2go/applications symlink if not already there +# as a regular file, as a symlink, as a special file or as a directory +if ! [ -e %{_sysconfdir}/x2go/applications ]; then + ln -s %{_datadir}/applications %{_sysconfdir}/x2go/applications +fi + %if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210 %if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_post x2goserver.service +%else +%service_add_post x2goserver.service +%endif +%else +%{_sbindir}/chkconfig --add x2goserver +%{_sbindir}/service x2goserver condrestart 1>/dev/null 2>&1 || : +%endif %preun +if [ -L %{_sysconfdir}/x2go/applications ]; then + rm -f %{_sysconfdir}/x2go/applications || : +fi + +%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210 +%if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_preun x2goserver.service %postun %systemd_postun x2goserver.service %else -%service_add_post x2goserver.service - -%preun %service_del_preun x2goserver.service %postun %service_del_postun x2goserver.service %endif %else -/sbin/chkconfig --add x2goserver -/sbin/service x2goserver condrestart 1>/dev/null 2>&1 || : +if [ "$1" = 0 ]; then + %{_sbindir}/service x2goserver stop 1>/dev/null 2>&1 + %{_sbindir}/chkconfig --del x2goserver +fi %postun if [ "$1" -ge "1" ] ; then - /sbin/service x2goserver condrestart 1>/dev/null 2>&1 || : -fi - -%preun -if [ "$1" = 0 ]; then - /sbin/service x2goserver stop 1>/dev/null 2>&1 - /sbin/chkconfig --del x2goserver + %{_sbindir}/service x2goserver condrestart 1>/dev/null 2>&1 || : fi %endif -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git