]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.macros
- fix
[packages/rpm.git] / rpm.macros
index b47fda8a0da818ac133b8fc20b3f7ccbb012dcf6..9ab89de06b628861c11888aef63a808f225d89f8 100644 (file)
@@ -251,7 +251,7 @@ unset LINGUAS ||:\
 %apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' /usr/include/apache/ap_mmn.h 2>/dev/null || echo ERROR)
 
 # kernel version-release handling
-%__kernel_ver  %([ -f %{_kernelsrcdir}/include/linux/version.h ] && (grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | head -n 1 | cut -d'"' -f2) || (awk '/^VERSION/ { ver = $0; gsub(/VERSION.*=/, NIL, ver); } /^PATCHLEVEL/ { plev = $0; gsub(/PATCHLEVEL.*=/, NIL, plev); } /^SUBLEVEL/ { slev = $0; gsub(/SUBLEVEL.*=/, NIL, slev); } /^EXTRAVERSION/ { ever = $0; gsub(/EXTRAVERSION.*=/, NIL, ever); gsub(/ /, NIL, ever); } END { printf("%d.%d.%d%s", ver, plev, slev, ever); }' %{_kernelsrcdir}/Makefile 2> /dev/null))
+%__kernel_ver  %( VER_H=%{_kernelsrcdir}/include/linux/utsrelease.h; [ -f $VER_H ] || VER_H=%{_kernelsrcdir}/include/linux/version.h; [ -f $VER_H ] && (grep UTS_RELEASE $VER_H 2>/dev/null | head -n 1 | cut -d'"' -f2) || (awk '/^VERSION/ { ver = $0; gsub(/VERSION.*=/, NIL, ver); } /^PATCHLEVEL/ { plev = $0; gsub(/PATCHLEVEL.*=/, NIL, plev); } /^SUBLEVEL/ { slev = $0; gsub(/SUBLEVEL.*=/, NIL, slev); } /^EXTRAVERSION/ { ever = $0; gsub(/EXTRAVERSION.*=/, NIL, ever); gsub(/ /, NIL, ever); } END { printf("%d.%d.%d%s", ver, plev, slev, ever); }' %{_kernelsrcdir}/Makefile 2> /dev/null))
 %__kernel_rel  %(LC_ALL="C" rpm -qf %{_kernelsrcdir}/include/linux/fs.h 2>/dev/null --qf "%{RELEASE}" | grep -v "is not")
 %__kernel_rpmvr        %(LC_ALL="C" rpm -qf %{_kernelsrcdir}/include/linux/fs.h 2>/dev/null --qf "%{VERSION}-%{RELEASE}" | grep -v "is not")
 %_kernel_ver   %{__kernel_ver}%{?with_dist_kernel:%(echo %{__kernel_ver} | grep -q -e - || echo -%{__kernel_rel})}
@@ -496,7 +496,7 @@ fi \
 
 # Ruby
 %ruby_archdir          %(ruby -r rbconfig -e 'print Config::CONFIG["archdir"]' 2>/dev/null || echo ERROR)
-%ruby_ridir            %(ruby -r rbconfig -e 'include Config; print File.join(CONFIG["datadir"], "ri", CONFIG["ruby_version"], "system")' 2>/dev/null || echo ERROR)
+%ruby_ridir                    %(ruby -r rbconfig -e 'include Config; print File.join(CONFIG["datadir"], "ri", CONFIG["ruby_version"], "system")' 2>/dev/null || echo ERROR)
 %ruby_rubylibdir       %(ruby -r rbconfig -e 'print Config::CONFIG["rubylibdir"]' 2>/dev/null || echo ERROR)
 %ruby_sitearchdir      %(ruby -r rbconfig -e 'print Config::CONFIG["sitearchdir"]' 2>/dev/null || echo ERROR)
 %ruby_sitelibdir       %(ruby -r rbconfig -e 'print Config::CONFIG["sitelibdir"]' 2>/dev/null || echo ERROR)
@@ -504,7 +504,7 @@ fi \
 %ruby_ver_requires_eq  Requires:       ruby(ver) = %ruby_version
 %ruby_mod_ver_requires_eq      Requires:       ruby-modules(ver) = %ruby_version
 
-%php_pear_dir  %{_datadir}/pear
+%php_pear_dir          /usr/share/pear
 
 # directory where php includes are installed on system.
 %__php_includedir              /usr/include/php
@@ -537,14 +537,14 @@ fi \
 
 # Python specific macro definitions.
 # python main version
-%py_ver                %(python -c "import sys; print sys.version[:3]")
+%py_ver                        %(python -c "import sys; print sys.version[:3]")
 
 # directories
 %py_prefix             %(python -c "import sys; print sys.prefix")
 %py_libdir             %{py_prefix}/%{_lib}/python%{py_ver}
 %py_scriptdir  %{py_prefix}/share/python%{py_ver}
 %py_incdir             /usr/include/python%{py_ver}
-%py_sitedir    %{py_libdir}/site-packages
+%py_sitedir            %{py_libdir}/site-packages
 %py_sitescriptdir %{py_scriptdir}/site-packages
 %py_dyndir             %{py_libdir}/lib-dynload
 
@@ -693,7 +693,7 @@ else \
                %{-M} \\\
                %{-G:-G %{-G*}} \\\
                %{expand:%{%{#}}} 1>&2 || exit $? \
-       [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd \
+       [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd || : \
 fi;
 
 # Usage:
@@ -715,7 +715,7 @@ if [ -n "`/usr/bin/getgid %{1}`" ]; then \
 else \
        echo "Adding group %{1} GID=%{-g*}." \
        /usr/sbin/groupadd -g %{-g*} -r %{1} 1>&2 || exit $? \
-       [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group \
+       [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || : \
 fi;
 
 # apache_config_{install/uninstall} macros written by glen@pld-linux.org.
@@ -1043,6 +1043,6 @@ for schema in %*; do \
 done \
 %{nil}
 
-%env_update [ ! -x /sbin/env-update ] || /sbin/env-update -u
+%env_update [ ! -x /sbin/env-update ] || /sbin/env-update -u || :
 
 # vim:ts=4 sw=4 noet
This page took 0.028924 seconds and 4 git commands to generate.