]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut.spec: use pkg-config for bashcompletiondir
authorHarald Hoyer <harald@redhat.com>
Wed, 20 Mar 2013 06:15:04 +0000 (07:15 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 20 Mar 2013 06:15:04 +0000 (07:15 +0100)
dracut.spec

index 445463f977709b27cc7bc9598a51c97b10448f83..cd61770fe3e0af24d6b66c721e48523adb958c67 100644 (file)
@@ -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