[cherokee/f16] Latest 1.2.x upstream release .spec corrections for optional build for systemd Resolves bz 710474 Re

Pavel Lisý pali at fedoraproject.org
Mon Oct 10 14:50:05 UTC 2011


commit afbdddc3a3d19cdd25948c73d5d5856653214bb0
Author: Pavel Lisý <pali at fedoraproject.org>
Date:   Mon Oct 10 16:48:14 2011 +0200

    Latest 1.2.x upstream release
    .spec corrections for optional build for systemd
    Resolves bz 710474
    Resolves bz 713307
    Resolves bz 680691

 .gitignore    |    1 +
 cherokee.spec |   36 +++++++++++++++++++++---------------
 sources       |    3 +--
 3 files changed, 23 insertions(+), 17 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7b855e1..cdd27ad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ clog
 cherokee-1.2.1.tar.gz
 cherokee-1.2.99.tar.gz
 openssl-1.0.0d.tar.gz
+/cherokee-1.2.100.tar.gz
diff --git a/cherokee.spec b/cherokee.spec
index 4b76125..3a93af6 100644
--- a/cherokee.spec
+++ b/cherokee.spec
@@ -1,11 +1,11 @@
 %define         home %{_var}/lib/%{name}
-%define         shortversion %(echo %{version} | grep -oE '[0-9]+\.[0-9]+')
+%define         shortversion   %(echo %{version} | sed -e 's/^\([0-9]+\.[0-9]+\)\.[0-9]+/\1/g')
 %define         opensslversion 1.0.0d
 %{!?_unitdir:%define _unitdir /lib/systemd/system}
 
 Name:           cherokee
-Version:        1.2.99
-Release:        2%{?dist}
+Version:        1.2.100
+Release:        1%{?dist}
 Summary:        Flexible and Fast Webserver
 
 Group:          Applications/Internet
@@ -34,7 +34,7 @@ BuildRequires:  gettext
 # For spawn-fcgi
 Requires:        spawn-fcgi
 
-%if "%{dist}" == ".f15" || "%{dist}" == ".f16"
+%if "%{dist}" == ".fc15" || "%{dist}" == ".fc16" || "%{dist}" == ".fc17"
 Requires(post): systemd-units
 Requires(preun): systemd-units
 Requires(postun): systemd-units
@@ -109,7 +109,7 @@ make install DESTDIR=%{buildroot}
 %{__install} -D -m 0644 %{SOURCE2}   %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
 %{__install} -d %{buildroot}%{_var}/{log,lib}/%{name}/
 %{__install} -d %{buildroot}%{_sysconfdir}/pki/%{name}
-%if "%{dist}" == ".f15" || "%{dist}" == ".f16"
+%if "%{dist}" == ".fc15" || "%{dist}" == ".fc16" || "%{dist}" == ".fc17"
 %{__install} -d %{buildroot}%{_unitdir}
 %{__install} -D -m 0644 %{SOURCE3}   %{buildroot}%{_unitdir}/%{name}.service
 %else
@@ -149,14 +149,8 @@ useradd -r -g %{name} -d %{home} -s /sbin/nologin \
    -c "%{name} web server" %{name}
 exit 0
 
-%preun
-if [ $1 = 0 ] ; then
-    /sbin/service %{name} stop >/dev/null 2>&1
-    /sbin/chkconfig --del %{name}
-fi
-
 %post
-%if "%{dist}" == ".f15" || "%{dist}" == ".f16"
+%if "%{dist}" == ".fc15" || "%{dist}" == ".fc16" || "%{dist}" == ".fc17"
 if [ $1 -eq 1 ] ; then 
     # Initial installation: enabled by default
     /bin/systemctl enable cherokee.service >/dev/null 2>&1 || :
@@ -166,17 +160,22 @@ fi
 /sbin/chkconfig --add %{name}
 %endif
 
-%if "%{dist}" == ".f15" || "%{dist}" == ".f16"
 %preun
+%if "%{dist}" == ".fc15" || "%{dist}" == ".fc16" || "%{dist}" == ".fc17"
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /bin/systemctl --no-reload disable cherokee.service > /dev/null 2>&1 || :
     /bin/systemctl stop cherokee.service > /dev/null 2>&1 || :
 fi
+%else
+if [ $1 = 0 ] ; then
+    /sbin/service %{name} stop >/dev/null 2>&1
+    /sbin/chkconfig --del %{name}
+fi
 %endif
 
 %postun
-%if "%{dist}" == ".f15" || "%{dist}" == ".f16"
+%if "%{dist}" == ".fc15" || "%{dist}" == ".fc16" || "%{dist}" == ".fc17"
 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
@@ -188,7 +187,7 @@ fi
 
 %files
 %defattr(-,root,root,-)
-%if "%{dist}" == ".f15" || "%{dist}" == ".f16"
+%if "%{dist}" == ".fc15" || "%{dist}" == ".fc16" || "%{dist}" == ".fc17"
 %{_unitdir}/%{name}.service
 %else
 %{_sysconfdir}/init.d/%{name}
@@ -248,6 +247,13 @@ fi
 %{_libdir}/lib%{name}-*.so
 
 %changelog
+* Mon Oct 10 2011 Pavel Lisý <pali at fedoraproject.org> - 1.2.100-1
+- Latest 1.2.x upstream release
+- .spec corrections for optional build for systemd
+- Resolves bz 710474
+- Resolves bz 713307
+- Resolves bz 680691
+
 * Wed Sep 14 2011 Pavel Lisý <pali at fedoraproject.org> - 1.2.99-2
 - .spec corrections for EL4 build
 
diff --git a/sources b/sources
index 750947f..6708078 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-40b6ea380cc8a5bf9734c2f8bf7e701e  openssl-1.0.0d.tar.gz
-c83115c3eebb29e6f2b4cc6fe699affe  cherokee-1.2.99.tar.gz
+ccbb3865d0544f8772a1b163efb3be34  cherokee-1.2.100.tar.gz


More information about the scm-commits mailing list