[guacd/el6] Change systemd requirements as per new package guidelines and fix fedpkg checks. Requires fedpkg > 1
Simone Caronni
slaanesh at fedoraproject.org
Wed Oct 17 08:38:15 UTC 2012
commit 9e84f5725f8af80cf38f7e89760ae75a239d5c80
Author: Simone Caronni <negativo17 at gmail.com>
Date: Wed Oct 17 10:37:45 2012 +0200
Change systemd requirements as per new package guidelines and fix fedpkg checks. Requires fedpkg > 1.10.
guacd.spec | 43 ++++++++++++++++++++++++++++---------------
1 files changed, 28 insertions(+), 15 deletions(-)
---
diff --git a/guacd.spec b/guacd.spec
index 0971c7c..4e26ce8 100644
--- a/guacd.spec
+++ b/guacd.spec
@@ -1,6 +1,6 @@
Name: guacd
Version: 0.6.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Proxy daemon for Guacamole
Group: System Environment/Daemons
License: MPLv1.1 or GPLv2+ or LGPLv2+
@@ -13,18 +13,28 @@ Source3: %{name}.init
BuildRequires: cairo-devel
BuildRequires: libguac-devel >= %{version}
-%if 0%{?fedora} >= 16 || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: systemd-units
+%endif
+
+%if 0%{?fedora} == 16 || 0%{?fedora} == 17
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+%endif
+%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
Requires(post): systemd-sysv
-Requires(post): systemd-units
-Requires(preun): systemd-units
-Requires(postun): systemd-units
-%else
-Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/chkconfig
-Requires(preun): /sbin/service
-Requires(postun): /sbin/service
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+%endif
+
+%if 0%{?rhel} == 6
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig
+Requires(preun): /sbin/service
+Requires(postun): /sbin/service
%endif
%description
@@ -52,7 +62,7 @@ make install DESTDIR=%{buildroot} INSTALL="install -p"
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
install -p -m 644 -D %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
-%if 0%{?fedora} >= 16 || 0%{?rhel} > 6
+%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
# Systemd unit files
mkdir -p %{buildroot}%{_unitdir}
@@ -66,9 +76,7 @@ install -p -m 755 -D %{SOURCE3} %{buildroot}%{_initrddir}/%{name}
%endif
-# Until this is fixed upstream in fedpkg, leave it like this
-# http://permalink.gmane.org/gmane.linux.redhat.fedora.devel/168291
-%if (0%{?fedora} == 16 || 0%{?fedora} == 17) && !0%{?rhel}
+%if 0%{?fedora} == 16 || 0%{?fedora} == 17
%post
if [ $1 -eq 1 ] ; then
@@ -128,13 +136,18 @@ fi
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_mandir}/man8/%{name}.8.*
%{_sbindir}/%{name}
-%if 0%{?fedora} >= 16 || 0%{?rhel} > 6
+%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
%{_unitdir}/%{name}.service
%else
%{_initrddir}/%{name}
%endif
%changelog
+* Wed Oct 17 2012 Simone Caronni <negativo17 at gmail.com> - 0.6.1-4
+- Fix fedpkg checks. Requires fedpkg > 1.10:
+ http://git.fedorahosted.org/cgit/fedpkg.git/commit/?id=11c46c06a3c9cc2f58d68aea964dd37dc028e349
+- Change systemd requirements as per new package guidelines.
+
* Thu Sep 13 2012 Simone Caronni <negativo17 at gmail.com> - 0.6.1-3
- Change Source0 URL
More information about the scm-commits
mailing list