try installing the service files conditionally
This commit is contained in:
parent
9334fafdce
commit
c1447ecc7c
27
torque.spec
27
torque.spec
@ -80,6 +80,10 @@ Source4: xpbs.png
|
||||
Source5: xpbsmon.png
|
||||
Source6: README.Fedora
|
||||
Source8: config
|
||||
Source20: pbs-mom.service
|
||||
Source21: pbs-sched.service
|
||||
Source22: pbs-server.service
|
||||
Source23: trqauthd.service
|
||||
# Feb 3rd 2011, I've sent a mail upstream to request the re-inclusion
|
||||
# of the OpenPBS license file in distribution.
|
||||
# I'll announce to fedora-devel once this is resolved either way.
|
||||
@ -389,12 +393,21 @@ rm -f %{buildroot}%{_libdir}/*/buildindex
|
||||
rm -f %{buildroot}/%{_lib}/security/pam_pbssimpleauth.{a,la}
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
|
||||
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
|
||||
# install systemd scripts
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
install -p -m 644 %{SOURCE20} %{buildroot}%{_unitdir}/
|
||||
install -p -m 644 %{SOURCE21} %{buildroot}%{_unitdir}/
|
||||
install -p -m 644 %{SOURCE22} %{buildroot}%{_unitdir}/
|
||||
install -p -m 644 %{SOURCE23} %{buildroot}%{_unitdir}/
|
||||
%else
|
||||
# install initscripts
|
||||
mkdir -p %{buildroot}%{_initrddir}
|
||||
install -p -m 755 contrib/init.d/pbs_mom %{buildroot}%{_initrddir}/pbs_mom
|
||||
install -p -m 755 contrib/init.d/pbs_sched %{buildroot}%{_initrddir}/pbs_sched
|
||||
install -p -m 755 contrib/init.d/pbs_server %{buildroot}%{_initrddir}/pbs_server
|
||||
install -p -m 755 contrib/init.d/trqauthd %{buildroot}%{_initrddir}/trqauthd
|
||||
%endif
|
||||
|
||||
%if %{build_gui}
|
||||
# This is really trivial, but cleans up an rpmlint warning
|
||||
@ -733,7 +746,11 @@ fi
|
||||
%{_sbindir}/qnoded
|
||||
%{_sbindir}/pbs_demux
|
||||
%{_bindir}/pbs_track
|
||||
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
|
||||
%{_unitdir}/pbs-mom.service
|
||||
%else
|
||||
%{_initrddir}/pbs_mom
|
||||
%endif
|
||||
%if %{use_rcp}
|
||||
%attr(4755, root, root) %{_sbindir}/pbs_rcp
|
||||
%endif
|
||||
@ -755,7 +772,11 @@ fi
|
||||
%defattr(-, root, root, -)
|
||||
%attr(0755, root, root) %{_sbindir}/pbs_sched
|
||||
%{_sbindir}/qschedd
|
||||
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
|
||||
%{_unitdir}/pbs-scheduler.service
|
||||
%else
|
||||
%{_initrddir}/pbs_sched
|
||||
%endif
|
||||
%dir %{torquehomedir}/sched_priv
|
||||
%config(noreplace) %{torquehomedir}/sched_priv/*
|
||||
%{torquehomedir}/sched_logs
|
||||
@ -776,7 +797,13 @@ fi
|
||||
%attr(0755, root, root) %{_sbindir}/momctl
|
||||
%attr(0755, root, root) %{_sbindir}/trqauthd
|
||||
%{_sbindir}/qserverd
|
||||
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
|
||||
%{_unitdir}/pbs-server.service
|
||||
%{_unitdir}/trqauthd.service
|
||||
%else
|
||||
%{_initrddir}/pbs_server
|
||||
%{_initrddir}/trqauthd.service
|
||||
%endif
|
||||
%dir %{_var}/log/torque/server_logs
|
||||
%{torquehomedir}/server_logs
|
||||
%{torquehomedir}/server_priv
|
||||
|
Loading…
Reference in New Issue
Block a user