mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
Accept udev and dracut paths specified by ./configure
There are two common locations where udev and dracut components are commonly installed. When building packages using the 'make rpm|deb' targets check those common locations and pass them to rpmbuild. For non-standard configurations these values can be provided by the the following configure options: --with-udevdir=DIR install udev helpers [default=check] --with-udevruledir=DIR install udev rules [[UDEVDIR/rules.d]] --with-dracutdir=DIR install dracut helpers [default=check] When rebuilding using the source packages the per-distribution default values specified in the spec file will be used. This is the preferred way to build packages for a distribution but the ability to override the defaults is provided as a convenience. Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2310 Closes #1680
This commit is contained in:
committed by
Brian Behlendorf
parent
7f6884f419
commit
2ee4e7da90
+23
-2
@@ -1,12 +1,32 @@
|
||||
%global _sbindir /sbin
|
||||
%global _libdir /%{_lib}
|
||||
%if 0%{?fedora} >= 17
|
||||
|
||||
# Set the default udev directory based on distribution.
|
||||
%if 0%{!?_udevdir}
|
||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
|
||||
%global _udevdir %{_prefix}/lib/udev
|
||||
%global _dracutdir %{_prefix}/lib/dracut
|
||||
%else
|
||||
%global _udevdir /lib/udev
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Set the default udevrule directory based on distribution.
|
||||
%if 0%{!?_udevruledir}
|
||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
|
||||
%global _udevruledir %{_prefix}/lib/udevrule/rules.d
|
||||
%else
|
||||
%global _udevruledir /lib/udevrule/rules.d
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Set the default dracut directory based on distribution.
|
||||
%if 0%{!?_dracutdir}
|
||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
|
||||
%global _dracutdir %{_prefix}/lib/dracut
|
||||
%else
|
||||
%global _dracutdir %{_prefix}/share/dracut
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%bcond_with debug
|
||||
%bcond_with blkid
|
||||
@@ -192,6 +212,7 @@ image which is ZFS aware.
|
||||
%configure \
|
||||
--with-config=user \
|
||||
--with-udevdir=%{_udevdir} \
|
||||
--with-udevruledir=%{_udevruledir} \
|
||||
--with-dracutdir=%{_dracutdir} \
|
||||
--disable-static \
|
||||
%{debug} \
|
||||
|
||||
Reference in New Issue
Block a user