]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
- add -d <dir> option to %build_kernel_modules
authorsparky <sparky@pld-linux.org>
Sun, 12 Nov 2006 17:39:55 +0000 (17:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm.macros -> 1.328

rpm.macros

index e1ada99a5d76660f0721c69d1067f1f10c41b083..314627ec5176c09c71d070d416a35179192be958 100644 (file)
@@ -1065,12 +1065,13 @@ done \
 # Author: Przemyslaw Iskra <sparky@pld-linux.org>
 #
 # Usage:
-#      %build_kernel_modules -m <modules>
+#      %build_kernel_modules -m <modules> -d <directory>
 #
 #  remember that proper Makefile is still required
 # Options:
 #  -m <modules> (required) -- comma-separated list of modules to save,
 #              without .ko extension, may be placed in subdirectory
+#  -d <directory> -- change to <directory> before doing anything
 #  -p <arg>, -P <arg> -- arguments passeed to make scripts
 #  <additional arguments> -- all additional arguments will be passed to
 #              make modules
@@ -1089,7 +1090,7 @@ done \
 # - in last line \ has to touch arguments so arguments passing
 #   in new lines (using \) will be supported
 
-%build_kernel_modules(p:P:m:)                                                                          \
+%build_kernel_modules(p:P:m:d:)                                                                                \
 %{!?-m:%{error:%{0}: Required module name/list missing} exit 1}                \
                                                                                                                                        \
 %define Opts                                                                                                           \\\\\\\
@@ -1108,6 +1109,7 @@ done \
 compile() {                                                                                                                    \
        L="<"; [[ '%{*}' != *$L$L* ]] || PATCH_SH="set -x -e;$(cat)"    \
        set -e -x                                                                                                               \
+%{?-d:cd %{-d*}}                                                                                                       \
                                                                                                                                        \
 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do \
        [ -r "%{_kernelsrcdir}/config-$cfg" ] || exit 1                                 \
@@ -1142,6 +1144,7 @@ for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}
                [ -z "${MODULE}" ] || mv ${MODULE}{,-$cfg}.ko                           \
        done                                                                                                                    \
 done                                                                                                                           \
+%{?-d:cd -}                                                                                                                    \
 }                                                                                                                                      \
 compile %{*}\
 %{nil}
This page took 0.071325 seconds and 4 git commands to generate.