From 6c904d6b893415fecb2609cd2c35ae40cc1bad6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Mon, 18 May 2015 19:25:40 +0200 Subject: [PATCH] spec: added conditionals for versioned DOCDIR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is to support RHEL <= 7. Signed-off-by: Jaroslav Škarvada --- tuned.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tuned.spec b/tuned.spec index 22a1dfd..7ca7561 100644 --- a/tuned.spec +++ b/tuned.spec @@ -21,6 +21,12 @@ Based on that information components will then be put into lower or higher power saving modes to adapt to the current usage. Currently only ethernet network and ATA harddisk devices are implemented. +%if 0%{?rhel} <= 7 +%global docdir %{_docdir}/%{name}-%{version} +%else +%global docdir %{_docdir}/%{name} +%endif + %package gtk Summary: GTK GUI for tuned Requires: %{name} = %{version}-%{release} @@ -87,7 +93,7 @@ It can be also used to fine tune your system for specific scenarios. %install -make install DESTDIR=%{buildroot} +make install DESTDIR=%{buildroot} DOCDIR=%{docdir} %if 0%{?rhel} sed -i 's/\(dynamic_tuning[ \t]*=[ \t]*\).*/\10/' %{buildroot}%{_sysconfdir}/tuned/tuned-main.conf %endif