X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm.macros;h=c7921eb061a0749432ccf7c6c1d7c795005373aa;hb=7bef60e80e810247be191ea6f4b7f5baa43480b1;hp=a323f44ee3a8950a4e539ef47125e33c2ee4ec44;hpb=f9aa75bfbe9e26c79b40e4f739d97359df18e069;p=packages%2Frpm-build-macros.git diff --git a/rpm.macros b/rpm.macros index a323f44..c7921eb 100644 --- a/rpm.macros +++ b/rpm.macros @@ -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 %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}