因为pre6未将debug info提出来,因而编译出来的rpm包很大。在fr中关于debug info package的macro预定义如下:
# Template for debug information sub-package.
# NOTE: This is a copy from rpm to get the ifnarch noarch fix, it can be removed later
%debug_package \
%ifnarch noarch\
%global __debug_package 1\
%package debuginfo \
Summary: Debug information for package %{name}\
Group: Development/Debug\
%description debuginfo\
This package provides debug information for package %{name}.\
Debug information is useful when developing applications that use this\
package or when debugging this package.\
%files debuginfo -f debugfiles.list\
%defattr(-,root,root)\
%endif\
%{nil}
# Bad hack to set $LANG to C during all RPM builds
%prep \
%%prep\
LANG=C\
export LANG\
unset DISPLAY\
%{nil}
%build %%build\
LANG=C\
export LANG\
unset DISPLAY\
%{nil}
%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
%%install\
LANG=C\
export LANG\
unset DISPLAY\
%{nil}
%find_lang /usr/lib/rpm/redhat/find-lang.sh %{buildroot}
#
# use internal dep generator?
%_use_internal_dependency_generator 1
#
# Should missing %doc files terminate a build?
%_missing_doc_files_terminate_build 0
#
# Should unpackaged files in a build root terminate a build?
%_unpackaged_files_terminate_build 0 ---->该行在fr中默认设为1,需手动改为0。
%__find_provides /usr/lib/rpm/redhat/find-provides
%__find_requires /usr/lib/rpm/redhat/find-requires
%__global_cflags -O2 -g -pipe
最新评论