summaryrefslogtreecommitdiffstats
path: root/0068-dracut.spec-use-pkg-config-for-bashcompletiondir.patch
blob: 606f8ae57b452ae84dcc635271401614b0563225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 8c67d395d42b4e34c10418aa6c167122a72a951b Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 20 Mar 2013 07:15:04 +0100
Subject: [PATCH] dracut.spec: use pkg-config for bashcompletiondir

---
 dracut.spec | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dracut.spec b/dracut.spec
index 445463f..cd61770 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -34,6 +34,8 @@ BuildRequires: dash bash git
 
 %if 0%{?fedora} || 0%{?rhel}
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: bash-completion
+BuildRequires: pkgconfig
 %endif
 %if 0%{?suse_version}
 BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -204,7 +206,8 @@ make install DESTDIR=$RPM_BUILD_ROOT \
 %if %{defined _unitdir}
      systemdsystemunitdir=%{_unitdir} \
 %endif
-     sysconfdir=/etc mandir=%{_mandir}
+     sysconfdir=/etc mandir=%{_mandir} \
+     bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion)
 
 echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh