diff --git a/pki-kra.spec b/pki-kra.spec index 0747773..14b1bab 100644 --- a/pki-kra.spec +++ b/pki-kra.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 @@ -113,7 +115,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 %{__rm} -rf %{buildroot} @@ -175,7 +178,7 @@ fi if [ -d /etc/sysconfig/pki/kra ]; then for inst in `ls /etc/sysconfig/pki/kra`; do if [ ! -e "/etc/systemd/system/pki-krad.target.wants/pki-krad@${inst}.service" ]; then - ln -s "/lib/systemd/system/pki-krad@.service" \ + ln -s "%{_unitdir}/pki-krad@.service" \ "/etc/systemd/system/pki-krad.target.wants/pki-krad@${inst}.service" [ -L /var/lib/${inst}/${inst} ] && unlink /var/lib/${inst}/${inst} ln -s /usr/sbin/tomcat6-sysd /var/lib/${inst}/${inst}