Skip to content

Commit

Permalink
Rewrite the with-dracutdir stuff to be more versatail.
Browse files Browse the repository at this point in the history
  • Loading branch information
FransUrbo committed May 20, 2014
1 parent af9e536 commit 0caa7df
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions rpm/generic/zfs.spec.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
%global _sbindir /sbin
%global _libdir /%{_lib}
%if 0%{?fedora} >= 17

%global _dracutdir @dracutdir@
%if !%{defined _dracutdir} || "%{?_dracutdir}" == "@dracutdir\@"
%if 0%{?fedora} >= 17 || 0%{?redhat} >= 7 || 0%{?centos} >= 7
%global _dracutdir %{_prefix}/lib/dracut
%else
%global _dracutdir %{_prefix}/share/dracut
%endif
%endif

%if 0%{?fedora} >= 17 || 0%{?redhat} >= 7 || 0%{?centos} >= 7
%global _udevdir %{_prefix}/lib/udev
%else
%global _udevdir /lib/udev
%endif
%global _dracutdir @dracutdir@

%bcond_with debug
%bcond_with blkid
Expand Down Expand Up @@ -123,6 +132,7 @@ image which is ZFS aware.
%configure \
--with-config=user \
--with-udevdir=%{_udevdir} \
--with-dracutdir=%{_dracutdir} \
--disable-static \
%{debug} \
%{blkid} \
Expand Down

0 comments on commit 0caa7df

Please sign in to comment.