]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.macros
- the both php versions autoprovs are not possible as this script is run for each...
[packages/rpm.git] / rpm.macros
index 402f5883fba9c334efe54388d559a16b054dbac6..8b57ae3b9127aa77b2ee247e39c3c7e3214dbe8c 100644 (file)
@@ -57,8 +57,8 @@
 %_dependency_whiteout  %{nil}
 
 %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
-       && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
-       [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
+       && RPM_BUILD_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN); \\\
+       [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$(($RPM_BUILD_NCPUS * 2))")
 
 #-----------------------------------------------------------------
 #
@@ -520,13 +520,15 @@ fi; }; __spec_install_post_chrpath } } }
 #
 %gconf_schema_install() \
        umask 022; \
-       GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" /usr/bin/gconftool-2 --makefile-install-rule /etc/gconf/schemas/%{?1}%{!?1:*.schemas} > /dev/null; \
+       GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" \\\
+       /usr/bin/gconftool-2 --makefile-install-rule /etc/gconf/schemas/%{?1}%{!?1:*.schemas} > /dev/null; \
 %{nil}
 
 %gconf_schema_uninstall() \
-if [ $1 = 0 ]; then \
+if [ $1 = 0 -a -x /usr/bin/gconftool-2 ]; then \
        umask 022; \
-       GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" /usr/bin/gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/%{?1} > /dev/null \
+       GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" \\\
+       /usr/bin/gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/%{?1} > /dev/null \
 fi; \
 %{nil}
 
@@ -536,15 +538,17 @@ fi; \
 %update_desktop_database() {{ \
        umask 022; \
        /usr/bin/update-desktop-database -q; \
-}}%{nil}
+};} \
+%{nil}
 
 %update_desktop_database_post %update_desktop_database
 
 %update_desktop_database_postun() {{ \
 if [ "$1" = "0" ]; then \
-       %update_desktop_database; \
+       %update_desktop_database \
 fi; \
-}}%{nil}
+};} \
+%{nil}
 
 #-----------------------------------------------------------------
 # Update shared MIME info database
@@ -553,7 +557,8 @@ fi; \
 %update_mime_database() {{ \
        umask 022; \
        /usr/bin/update-mime-database %{_datadir}/mime; \
-}}%{nil}
+};} \
+%{nil}
 
 #-----------------------------------------------------------------
 # Update icon cache
@@ -562,7 +567,8 @@ fi; \
 %update_icon_cache() {{ \
        umask 022; \
        /usr/bin/gtk-update-icon-cache -qf %{_datadir}/icons/%1; \
-}}%{nil}
+};} \
+%{nil}
 
 #-----------------------------------------------------------------
 # Update scrollkeeper database
@@ -628,6 +634,7 @@ fi; \
 %ruby_vendorlibdir     %{expand:%%global ruby_vendorlibdir %(%{__ruby} -r rbconfig -e 'print Config::CONFIG["vendorlibdir"]' 2>/dev/null || echo ERROR)}%ruby_vendorlibdir
 %ruby_sitearchdir      %{expand:%%global ruby_sitearchdir %(%{__ruby} -r rbconfig -e 'print Config::CONFIG["sitearchdir"]' 2>/dev/null || echo ERROR)}%ruby_sitearchdir
 %ruby_sitelibdir       %{expand:%%global ruby_sitelibdir %(%{__ruby} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]' 2>/dev/null || echo ERROR)}%ruby_sitelibdir
+%ruby_rdocdir          /usr/share/rdoc
 %ruby_version          %{expand:%%global ruby_version %(%{__ruby} -r rbconfig -e 'print Config::CONFIG["ruby_version"]' 2>/dev/null || echo ERROR)}%ruby_version
 %ruby_ver_requires_eq  Requires:       ruby(ver) = %ruby_version
 %ruby_mod_ver_requires_eq      Requires:       ruby-modules(ver) = %ruby_version
@@ -905,7 +912,7 @@ fi;
 %groupadd(g:P:rfo)     \
 %{!-g:%{error:groupadd: Required argument -g missing}} \
 %{!?1:%{error:groupadd: Required parameter group missing}} \
-if [ -n "`/usr/bin/getgid %{1}`" ]; then \
+if /usr/bin/getgid %{1} > /dev/null 2>&1; then \
        if [ "`/usr/bin/getgid %{1}`" != "%{-g*}" ]; then \
                echo "Error: group %{1} doesn't have gid=%{-g*}. Correct this before installing %{-P*}%{!?-P:%{name}}." 1>&2 \
                exit 1 \
@@ -1009,7 +1016,7 @@ fi \
 
 %java_home             %{expand:%%global java_home %([ -f %{_javadir}-utils/java-functions ] || { echo ERROR; exit 0; }; unset JAVA_HOME; . %{_javadir}-utils/java-functions; set_jvm; echo ${JAVA_HOME:-ERROR})}%java_home
 
-%ant                   JAVA_HOME=%{java_home} ant
+%ant                   JAVA_HOME=%{java_home} CLASSPATH=$CLASSPATH ant
 %jar                   %{java_home}/bin/jar
 %java                  %{expand:%%global java %([ -f %{_javadir}-utils/java-functions ] || { echo ERROR; exit 0; }; unset JAVACMD; . %{_javadir}-utils/java-functions; set_javacmd; echo $JAVACMD)}%java
 %javac                 %{java_home}/bin/javac
@@ -1310,7 +1317,7 @@ for cfg in ${cfgs:-dist}; do                                        \
        [ -z "$PATCH_SH" ] || echo "$PATCH_SH" | %__spec_build_shell    \
        set -x                                                                                                                  \
                                                                                                                                        \
-       %if %{with dist_kernel}                                                                                 \
+       %if %{with dist_kernel} || %(test -f %{_kernelsrcdir}/scripts/bin2c ; echo $?)  \
                %{__make} -j1 -C %{_kernelsrcdir} prepare scripts                       \\\
                        %{-p*} %{-P*}                                                                                   \\\
                        %{MakeOpts}                                                                                             \
This page took 0.055315 seconds and 4 git commands to generate.