%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; \
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 \
CFLAGS="${CFLAGS:-%rpmcflags}" \
CXXFLAGS="${CXXFLAGS:-%rpmcflags}" \
FFLAGS="${FFLAGS:-%rpmcflags}" \
+ CPPFLAGS="${CPPFLAGS:-%rpmcflags}" \
%{?__cc:CC=%{__cc}} \
%{?__cxx:CXX=%{__cxx}} \
--build=%{_target_platform} \
# 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_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}
%{?_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 \
touch %{_builddir}/__rpm_lock \
fi \
fi \
+%{?_noautocompressdoc:echo '%{_noautocompressdoc}' > %{_builddir}/__rpm_noautocompressdoc}\
%{nil}
%__os_install_post \
%{?_noautoprovfiles:_autoreqprov=y}\
%{?_noautoprov:_autoreqprov=y}\
%{?_noautoreqfiles:_autoreqprov=y}\
+%{?_noautocompressdoc:_autoreqprov=y}\
if [ "$_autoreqprov" = "y" ] ; then \
rm -f %{_builddir}/__rpm_* \
fi \