X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=myplc.spec;h=49240b62c7055686082a2b748738e0aa195b43b5;hb=0f82cadd7f6b1d91b739d060310192dab561f655;hp=c2b696d2842c0be4f36db3fe0f2bd35924efa689;hpb=0e65d7c550fc011e4cd99cc2f87beba721413ab7;p=myplc.git diff --git a/myplc.spec b/myplc.spec index c2b696d..49240b6 100644 --- a/myplc.spec +++ b/myplc.spec @@ -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" @@ -201,7 +208,11 @@ if [ -x /sbin/chkconfig ] ; then /sbin/chkconfig --add plc /sbin/chkconfig plc on fi -rpm -q php-fpm >& /dev/null && { systemctl enable php-fpm; systemctl start php-fpm; } + +%if "%{distro}" == "Fedora" && %{distrorelease} >= 27 +systemctl enable php-fpm +systemctl start php-fpm +%endif %triggerpostun -- %{name} # 0 = erase, 1 = upgrade @@ -253,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,-)