diff --git a/pki-tks.spec b/pki-tks.spec index 4e1e32e..1fab340 100644 --- a/pki-tks.spec +++ b/pki-tks.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 @@ -114,6 +116,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 @@ -174,7 +178,7 @@ fi if [ -d /etc/sysconfig/pki/tks ]; then for inst in `ls /etc/sysconfig/pki/tks`; do if [ ! -e "/etc/systemd/system/pki-tksd.target.wants/pki-tksd@${inst}.service" ]; then - ln -s "/lib/systemd/system/pki-tksd@.service" \ + ln -s "%{_unitdir}/pki-tksd@.service" \ "/etc/systemd/system/pki-tksd.target.wants/pki-tksd@${inst}.service" [ -L /var/lib/${inst}/${inst} ] && unlink /var/lib/${inst}/${inst} ln -s /usr/sbin/tomcat6-sysd /var/lib/${inst}/${inst}