]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
- added -D <DESTDIR> option to install_kernel_modules macro
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 22 Oct 2013 10:12:40 +0000 (12:12 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 22 Oct 2013 10:12:40 +0000 (12:12 +0200)
rpm.macros

index c9eda993946f396f71f484650a33cc7910c8cdd7..ab5e946bdd9239f157a6493a037a05795c328063 100644 (file)
@@ -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
This page took 0.041268 seconds and 4 git commands to generate.