redhat-rpm-config/macros

159 lines
4.7 KiB
Plaintext
Raw Normal View History

2002-06-12 12:59:50 +00:00
# Per-platform rpm configuration file.
#==============================================================================
# ---- per-platform macros.
#
%_vendor redhat
%_os linux
%_gnu -gnu
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
2002-06-12 12:59:50 +00:00
#==============================================================================
# ---- configure macros. note that most of these are inherited
# from the defaults.
2002-06-12 12:59:50 +00:00
#
%_prefix /usr
%_sysconfdir /etc
%_localstatedir /var
%_infodir /usr/share/info
%_mandir /usr/share/man
%_initrddir %{_sysconfdir}/rc.d/init.d
%_defaultdocdir %{_usr}/share/doc
2002-12-11 18:05:00 +00:00
%_enable_debug_packages 1
2002-06-12 12:59:50 +00:00
#==============================================================================
# ---- configure and makeinstall.
#
%configure \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
2003-07-15 13:38:58 +00:00
for i in $(find . -name config.guess -o -name config.sub) ; do \
[ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \
done ; \
2004-03-01 17:29:43 +00:00
./configure --build=%{_build} --host=%{_host} \\\
2003-07-15 13:38:58 +00:00
--target=%{_target_platform} \\\
2003-07-15 13:44:02 +00:00
--program-prefix=%{?_program_prefix} \\\
2003-07-15 13:38:58 +00:00
--prefix=%{_prefix} \\\
2002-06-12 12:59:50 +00:00
--exec-prefix=%{_exec_prefix} \\\
--bindir=%{_bindir} \\\
--sbindir=%{_sbindir} \\\
--sysconfdir=%{_sysconfdir} \\\
--datadir=%{_datadir} \\\
--includedir=%{_includedir} \\\
--libdir=%{_libdir} \\\
--libexecdir=%{_libexecdir} \\\
--localstatedir=%{_localstatedir} \\\
--sharedstatedir=%{_sharedstatedir} \\\
--mandir=%{_mandir} \\\
--infodir=%{_infodir}
%makeinstall \
2003-11-03 20:35:50 +00:00
%{__make} \\\
2002-06-12 12:59:50 +00:00
prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
install
%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
#==============================================================================
# ---- Build policy macros.
#
#---------------------------------------------------------------------
# Expanded at end of %install scriptlet.
#
%__arch_install_post %{nil}
%__os_install_post \
/usr/lib/rpm/redhat/brp-compress \
2002-11-21 16:54:33 +00:00
/usr/lib/rpm/redhat/brp-strip %{__strip} \
2003-01-09 19:52:00 +00:00
/usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
2002-11-21 16:54:33 +00:00
/usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
2005-06-16 15:42:31 +00:00
/usr/lib/rpm/brp-python-bytecompile \
2002-06-12 12:59:50 +00:00
%{nil}
2003-01-22 18:30:56 +00:00
# /usr/lib/rpm/redhat/brp-implant-ident-static
2002-06-12 12:59:50 +00:00
%__spec_install_post\
%{?__debug_package:%{__debug_install_post}}\
2002-06-12 12:59:50 +00:00
%{__arch_install_post}\
%{__os_install_post}\
%{nil}
2002-12-14 20:37:32 +00:00
# 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\
2002-12-16 18:53:55 +00:00
%package debuginfo \
Summary: Debug information for package %{name}\
Group: Development/Debug\
2002-12-16 18:53:55 +00:00
%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.\
2002-12-16 18:53:55 +00:00
%files debuginfo -f debugfiles.list\
%defattr(-,root,root)\
%endif\
%{nil}
2002-06-12 12:59:50 +00:00
2002-06-12 21:04:24 +00:00
# Bad hack to set $LANG to C during all RPM builds
%prep \
%%prep\
2002-06-12 21:04:24 +00:00
LANG=C\
export LANG\
2003-03-03 16:16:20 +00:00
unset DISPLAY\
2002-06-12 21:04:24 +00:00
%{nil}
%build %%build\
LANG=C\
export LANG\
2003-03-03 16:16:20 +00:00
unset DISPLAY\
2002-06-12 21:04:24 +00:00
%{nil}
2002-06-12 12:59:50 +00:00
2002-12-14 20:37:32 +00:00
%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
%%install\
2002-06-12 21:04:24 +00:00
LANG=C\
export LANG\
2003-03-03 16:16:20 +00:00
unset DISPLAY\
2002-06-12 21:04:24 +00:00
%{nil}
2002-06-20 20:56:07 +00:00
%find_lang /usr/lib/rpm/redhat/find-lang.sh %{buildroot}
2002-07-31 17:05:22 +00:00
#
# use internal dep generator?
%_use_internal_dependency_generator 1
2002-07-31 17:05:22 +00:00
#
# Should missing %doc files terminate a build?
2002-10-04 13:45:14 +00:00
%_missing_doc_files_terminate_build 1
2002-07-31 18:56:20 +00:00
#
# Should unpackaged files in a build root terminate a build?
2002-10-04 13:45:14 +00:00
%_unpackaged_files_terminate_build 1
2002-11-21 15:16:38 +00:00
%__find_provides /usr/lib/rpm/redhat/find-provides
%__find_requires /usr/lib/rpm/redhat/find-requires
%__global_cflags -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
2005-03-22 03:30:56 +00:00
# Disable lookups
%_hkp_keyserver %{nil}