diff --git a/pki-ocsp.spec b/pki-ocsp.spec index 2eaffb3..fd4fe27 100644 --- a/pki-ocsp.spec +++ b/pki-ocsp.spec @@ -12,7 +12,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # specify '_unitdir' macro for platforms that don't use 'systemd' %if 0%{?rhel} || 0%{?fedora} < 16 -%define _unitdir /lib/systemd/system +%define _unitdir %{_unitdir} %endif BuildRequires: cmake @@ -40,6 +40,8 @@ Requires: pki-selinux >= 9.0.15 Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units +Conflicts: systemd < 38 +Conflicts: filesystem < 3 %else %if 0%{?fedora} >= 15 Requires: pki-common @@ -120,6 +122,8 @@ Additionally, Certificate System requires ONE AND ONLY ONE of the following %setup -q +# FIXME +sed -i -e 's#/lib/systemd/system#%{_unitdir}#g' cmake/Modules/DefineInstallationPaths.cmake %clean @@ -183,7 +187,7 @@ fi if [ -d /etc/sysconfig/pki/ocsp ]; then for inst in `ls /etc/sysconfig/pki/ocsp`; do if [ ! -e "/etc/systemd/system/pki-ocspd.target.wants/pki-ocspd@${inst}.service" ]; then - ln -s "/lib/systemd/system/pki-ocspd@.service" \ + ln -s "%{_unitdir}/pki-ocspd@.service" \ "/etc/systemd/system/pki-ocspd.target.wants/pki-ocspd@${inst}.service" [ -L /var/lib/${inst}/${inst} ] && unlink /var/lib/${inst}/${inst} ln -s /usr/sbin/tomcat6-sysd /var/lib/${inst}/${inst}