commit d41f5ef2c920e8b860f2fb59dc3f52724f6fb3da
Author: Jan Rękorajski <[email protected]>
Date: Tue Oct 22 12:12:40 2013 +0200
- added -D <DESTDIR> option to install_kernel_modules macro
rpm.macros | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/rpm.macros b/rpm.macros
index c9eda99..ab5e946 100644
--- a/rpm.macros
+++ b/rpm.macros
@@ -1822,12 +1822,17 @@ fi
\
# with same name exists in kernel already
# -n <file> -- name of modprobe config file to use (without .conf extension)
# for defining aliases, only useful with -s
+# -D <directory> -- DESTDIR, base directory for installed files,
+# defaults to RPM_BUILD_ROOT
-%install_kernel_modules(m:d:s:n:)
\
+%install_kernel_modules(m:d:s:n:D:)
\
%{!?-m:%{error:%{0}: Required module name (-m) missing}exit 1} \
%{!?-d:%{error:%{0}: Required module directory missing}exit 1} \
%{?-n:%{!?-s:%{error:%{0}: Modprobe .conf file requires module suffix}exit 1}}
\
\
+INSTALLROOT=%{-D*}
\
+[ -n "$INSTALLROOT" ] || INSTALLROOT=$RPM_BUILD_ROOT
\
+
\
%define KernelD $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}
\
%define ModprobeD $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{_kernel_ver} \
\
@@ -1864,6 +1869,7 @@ if [ -r "%{_kernelsrcdir}/.config" ]; then
\
else
\
__install_kernel_modules_old
\
fi
\
+unset INSTALLROOT
\
%{nil}
# patchset macros
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-macros.git/commitdiff/d41f5ef2c920e8b860f2fb59dc3f52724f6fb3da
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit