]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - rpm.macros
- add Author
[packages/rpm-build-macros.git] / rpm.macros
index a323f44ee3a8950a4e539ef47125e33c2ee4ec44..c7921eb061a0749432ccf7c6c1d7c795005373aa 100644 (file)
@@ -1065,7 +1065,7 @@ fi \
 # command invoking pear cli
 %__pear /usr/bin/pear
 
-# the main macro.
+# The main macro.
 # using this macro will append optional-packages.txt to the nocompressdoc list
 # as it's displayed to user after package install. and adding additional gzip
 # dep is just waste ;)
@@ -1097,9 +1097,8 @@ find . -type f -print0 | xargs -0 sed -i -e 's,\\r$,,' \
 %{!?_noautoprov:%global _noautoprov %{nil}}%{expand:%%global _noautoprov %{_noautoprov} 'pear(tests/.*)'} \
 %{nil}
 
-# copies exctracted PEAR package structure to buildroot.
-# also copies PEAR registry file.
-# please use this macro, for future extensions being possible.
+# Copies exctracted PEAR package structure and PEAR registry to buildroot.
+# Author: Elan Ruusamäe <glen@pld-linux.org>
 %pear_package_install() \
 cp -a ./%{php_pear_dir}/{.registry,*} $RPM_BUILD_ROOT%{php_pear_dir} \
 find $RPM_BUILD_ROOT%{php_pear_dir} '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v \
@@ -1184,7 +1183,7 @@ done \
 # Developer note: don't touch it unless you know how to handle '\'.
 # - \ in script expands to nothing
 # - \\\ in script expands to \
-# - \\\ inside definition expands to noting
+# - \\\ inside definition expands to nothing
 # - \\\\\\\ inside definition expands to \
 # - in last line \ has to touch arguments so arguments passing
 #   in new lines (using \) will be supported
@@ -1210,7 +1209,7 @@ compile() {                                                                                                                       \
        L="<"; [[ '%{*}' != *$L$L* ]] || PATCH_SH="set -x -e;$(cat)"    \
        set -e -x                                                                                                               \
                                                                                                                                        \
-for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do \
+for cfg in %{?with_dist_kernel:%{?with_smp:smp} %{?with_up:up}}%{!?with_dist_kernel:nondist}; do \
        [ -r "%{_kernelsrcdir}/config-$cfg" ] || exit 1                                 \
                                                                                                                                        \
        rm -rf o                                                                                                                \
@@ -1287,16 +1286,25 @@ install -d %{KernelD}{,smp}/%{-d*}                                                                      \
 for MODULE in {%{-m*},}; do                                                                                    \
        [ -n "${MODULE}" ] || continue                                                                  \
        MNAME=${MODULE##*/}                                                                                             \
-       install ${MODULE}-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \\\
-               %{KernelD}/%{-d*}/${MNAME}%{-s:-%{-s*}}.ko                                      \
-       %{?-s:echo "alias ${MNAME} ${MNAME}-%{-s*}"                                             \\\
-               >> %{ModprobeD}/%{-n*}.conf}                                                            \
-    %if %{with smp} && %{with dist_kernel}                                                     \
-       install ${MODULE}-smp.ko                                                                                \\\
-               %{KernelD}smp/%{-d*}/${MNAME}%{-s:-%{-s*}}.ko                           \
-       %{?-s:echo "alias ${MNAME} ${MNAME}-%{-s*}"                                             \\\
-               >> %{ModprobeD}smp/%{-n*}.conf}                                                         \
-    %endif                                                                                                                     \
+       %if %{without dist_kernel}                                                                              \
+               install %{MODULE}-nondist.ko                                                            \\\
+                       %{KernelD}/%{-d*}/${MNAME}%{-s:-%{-s*}}.ko                              \
+               %{?-s:echo "alias ${MNAME} ${MNAME}-%{-s*}"                                     \\\
+                       >> %{ModprobeD}/%{-n*}.conf}                                                    \
+       %else                                                                                                                   \
+       %if %{with up}                                                                                                  \
+               install ${MODULE}-up.ko                                                                         \\\
+                       %{KernelD}/%{-d*}/${MNAME}%{-s:-%{-s*}}.ko                              \
+               %{?-s:echo "alias ${MNAME} ${MNAME}-%{-s*}"                                     \\\
+                       >> %{ModprobeD}/%{-n*}.conf}                                                    \
+       %endif                                                                                                                  \
+       %if %{with smp}                                                                                                 \
+               install ${MODULE}-smp.ko                                                                        \\\
+                       %{KernelD}smp/%{-d*}/${MNAME}%{-s:-%{-s*}}.ko                   \
+               %{?-s:echo "alias ${MNAME} ${MNAME}-%{-s*}"                                     \\\
+                       >> %{ModprobeD}smp/%{-n*}.conf}                                                 \
+       %endif                                                                                                                  \
+       %endif                                                                                                                  \
 done                                                                                                                           \
 %{nil}
 
This page took 0.0535 seconds and 4 git commands to generate.