systemd services go in /usr/lib/systemd/system rather than /lib/<same>
[myplc.git] / myplc.spec
index 674fe86..49240b6 100644 (file)
@@ -1,6 +1,6 @@
 %define name myplc
 %define version 5.3
-%define taglevel 2
+%define taglevel 4
 
 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
 %global python_sitearch        %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" )
@@ -57,6 +57,10 @@ Requires: cronie
 %if "%{distro}" == "Fedora" && %{distrorelease} >= 16
 Requires: rpm-sign
 %endif
+# starting with f27 we depend on this new rpm
+%if "%{distro}" == "Fedora" && %{distrorelease} >= 27
+Requires: php-fpm
+%endif
 
 # planetlab stuff
 Requires: bootmanager
@@ -68,6 +72,9 @@ Requires: nodeconfig
 Requires: nodeyum
 Requires: plcapi >= 5.2
 # this technically is a plcapi dependency but it's simpler here for chosing which
+%if "%{distro}" == "Fedora" && %{distrorelease} >= 29
+Requires: python2-mod_wsgi
+%else
 %if "%{distro}" == "Fedora" && %{distrorelease} >= 18
 Requires: mod_wsgi
 %else
@@ -122,7 +129,7 @@ chmod 755 ${RPM_BUILD_ROOT}/usr/bin/*
 # Install initscript 
 echo "* Installing plc initscript"
 install -D -m 755 plc.init ${RPM_BUILD_ROOT}/etc/init.d/plc
-install -D -m 644 plc.service ${RPM_BUILD_ROOT}/lib/systemd/system/plc.service
+install -D -m 644 plc.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/plc.service
 
 # Install initscripts
 echo "* Installing plc.d initscripts"
@@ -202,6 +209,11 @@ if [ -x /sbin/chkconfig ] ; then
     /sbin/chkconfig plc on
 fi
 
+%if "%{distro}" == "Fedora" && %{distrorelease} >= 27
+systemctl enable php-fpm
+systemctl start  php-fpm
+%endif
+
 %triggerpostun -- %{name}
 # 0 = erase, 1 = upgrade
 if [ $1 -gt 0 ] ; then
@@ -252,7 +264,7 @@ fi
 /usr/bin/check-hrns.py*
 /usr/bin/check-vsys-defaults.py*
 /usr/bin/spot-dup-accounts.sh
-/lib/systemd/system/plc.service
+/usr/lib/systemd/system/plc.service
 
 %files config
 %defattr(-,root,root,-)
@@ -261,6 +273,12 @@ fi
 
 
 %changelog
+* Sun Jul 16 2017 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-5.3-4
+- takes care of creating plcapi log file
+
+* Wed Feb 18 2015 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-5.3-3
+- tweaked renew_reminder for federation
+
 * Fri Mar 21 2014 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-5.3-2
 - tweaks in check-hrns.py
 - do not require PyXML any more