]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.macros
Set TMPDIR=/tmp if wasn't set at all.
[packages/rpm.git] / rpm.macros
index ebddf65cfc0707ea000b889079d5eefdfdb1402a..2d9d369f33479e23df0d9b6a8fbe699e482def8a 100644 (file)
 %rpmcflags     %{?debug:%debugcflags}%{!?debug:%optflags}
 %rpmldflags    %{!?debug:-s}
 
+# kernel compiler
+%kgcc          gcc
+%kgcc_package  gcc
+
+#-----------------------------------------------------------------
+# Build system path macros.
+#
+%__libtoolize           libtoolize --copy --force
+%__gettextize           gettextize --copy --force
+%__automake             automake -a -c -f --foreign
+%__autoconf             autoconf %{?debug:-Wall}
+
 #-----------------------------------------------------------------
 %configure2_13 { \
  if [ -n "$LINGUAS" ]; then unset LINGUAS; fi; \
@@ -32,6 +44,7 @@
  CFLAGS="${CFLAGS:-%rpmcflags}" ; export CFLAGS ; \
  CXXFLAGS="${CXXFLAGS:-%rpmcflags}" ; export CXXFLAGS ; \
  FFLAGS="${FFLAGS:-%rpmcflags}" ; export FFLAGS ; \
+ CPPFLAGS="${CPPFLAGS:-}" ; export CPPFLAGS ; \
  %{?__cc:CC=%{__cc} ; export CC ; } \
  %{?__cxx:CXX=%{__cxx} ; export CXX ; } \
  ./configure \
@@ -57,6 +70,7 @@
        CFLAGS="${CFLAGS:-%rpmcflags}" \
        CXXFLAGS="${CXXFLAGS:-%rpmcflags}" \
        FFLAGS="${FFLAGS:-%rpmcflags}" \
+       CPPFLAGS="${CPPFLAGS:-%rpmcflags}" \
        %{?__cc:CC=%{__cc}} \
        %{?__cxx:CXX=%{__cxx}} \
        --build=%{_target_platform} \
@@ -78,6 +92,9 @@
 # Location of autoconf macros
 %_aclocaldir   %(aclocal --print-ac-dir)
 
+# Location of omf files
+%_omf_dest_dir %(scrollkeeper-config --omfdir)
+
 # Location of pkgconfig files
 %_pkgconfigdir /usr/lib/pkgconfig
 
 %_kernelsrcdir /usr/src/linux
 
 # If non-empty "debug" macro defined, add "dbg" suffix to release number
-%_rpmfilename          %%{NAME}-%%{VERSION}-%%{RELEASE}%{?debug:dbg}.%%{ARCH}.rpm
+%_rpmfilename  %%{NAME}-%%{VERSION}-%%{RELEASE}%{?debug:dbg}.%%{ARCH}.rpm
 
 # requires name = version-release
-%requires_releq()  %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}-%%{RELEASE}' %1| grep -v "is not")
-%requires_kernel_releq() %(LC_ALL="C" rpm -q --queryformat 'Prereq:kernel = %%{VERSION}-%%{RELEASE}' kernel-headers | grep -v "is not")
+%requires_releq()              %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}-%%{RELEASE}' %1| grep -v "is not")
+%requires_kernel_releq()       %(LC_ALL="C" rpm -q --queryformat 'Prereq:kernel = %%{VERSION}-%%{RELEASE}' kernel-headers | grep -v "is not")
+%requires_releq_kernel_up()    %(LC_ALL="C" rpm -q --queryformat 'Prereq:kernel-up = %%{VERSION}-%%{RELEASE}' kernel-headers | grep -v "is not")
+%requires_releq_kernel_smp()   %(LC_ALL="C" rpm -q --queryformat 'Prereq:kernel-smp = %%{VERSION}-%%{RELEASE}' kernel-headers | grep -v "is not")
+
+# kernel version-release handling
+%__kernel_ver    %(grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | cut -d'"' -f2)
+%__kernel_rel    %(LC_ALL="C" rpm -qf %{_kernelsrcdir}/include/linux/version.h --queryformat "%{RELEASE}" | grep -v "is not")
+%_kernel_ver     %(echo %{__kernel_ver}%{!?_without_dist_kernel:-%{__kernel_rel}})
+%_kernel_ver_str %(echo %{_kernel_ver} | sed s/-/_/g)
 
 #-----------------------------------------------------------------
 # find and gzip all files in %{_mandir} and %{infodir}
@@ -170,6 +195,7 @@ _autoreqprov=n \
 %{?_noautoreqdep:_autoreqprov=y}\
 %{?_noautoprovfiles:_autoreqprov=y}\
 %{?_noautoprov:_autoreqprov=y}\
+%{?_noautocompressdoc:_autoreqprov=y}\
 if [ "$_autoreqprov" = "y" ] ; then \
     if [ -f %{_builddir}/__rpm_lock ] ; then \
        echo "Some package using \%_noauto*  macros is already being built" >&2 \
@@ -180,6 +206,7 @@ if [ "$_autoreqprov" = "y" ] ; then \
        touch %{_builddir}/__rpm_lock \
     fi \
 fi \
+%{?_noautocompressdoc:echo '%{_noautocompressdoc}' > %{_builddir}/__rpm_noautocompressdoc}\
 %{nil}
 
 %__os_install_post \
@@ -201,6 +228,7 @@ _autoreqprov=n \
 %{?_noautoprovfiles:_autoreqprov=y}\
 %{?_noautoprov:_autoreqprov=y}\
 %{?_noautoreqfiles:_autoreqprov=y}\
+%{?_noautocompressdoc:_autoreqprov=y}\
 if [ "$_autoreqprov" = "y" ] ; then \
        rm -f %{_builddir}/__rpm_* \
 fi \
This page took 0.032298 seconds and 4 git commands to generate.