redhat-rpm-config/macros
Jens Petersen cb63b82a2d Add %{?_gnu} to _target_platform.
Use --host, --build, --target and --program-prefix in %configure.
7.3.92-4
2002-06-28 05:25:23 +00:00

132 lines
3.8 KiB
Plaintext

# Per-platform rpm configuration file.
#==============================================================================
# ---- per-platform macros.
#
%_vendor redhat
%_os linux
%_gnu -gnu
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
#==============================================================================
# ---- configure macros.
#
%_prefix /usr
%_exec_prefix %{_prefix}
%_bindir %{_exec_prefix}/bin
%_sbindir %{_exec_prefix}/sbin
%_libexecdir %{_exec_prefix}/libexec
%_datadir %{_prefix}/share
%_sysconfdir /etc
%_sharedstatedir %{_prefix}/com
%_localstatedir /var
%_lib lib
%_libdir %{_exec_prefix}/%{_lib}
%_includedir %{_prefix}/include
%_oldincludedir /usr/include
%_infodir /usr/share/info
%_mandir /usr/share/man
%_initrddir %{_sysconfdir}/rc.d/init.d
%_defaultdocdir %{_usr}/share/doc
#==============================================================================
# ---- configure and makeinstall.
#
%configure \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
./configure --host=%{_host} --build=%{_build} \\\
--target=%{_target_platform} \\\
--program-prefix=%{?_program_prefix:%{_program_prefix}} \\\
--prefix=%{_prefix} \\\
--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 \
make \\\
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 \
/usr/lib/rpm/redhat/brp-strip \
/usr/lib/rpm/redhat/brp-strip-comment-note \
%{nil}
%__spec_install_post\
%{__arch_install_post}\
%{__os_install_post}\
%{nil}
#---------------------------------------------------------------------
# Expanded at end of %prep
#
%__id_u %{__id} -u
%__chown_Rhf %{__chown} -Rhf
%__chgrp_Rhf %{__chgrp} -Rhf
%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root
%_fixperms %{__chmod} -Rf a+rX,g-w,o-w
#---------------------------------------------------------------------
# Always use %defattr(-,root,root) in %files (added in rpm-4.0.4)
#
#%files(n:f:) %%files%{?-f: -f %{-f*}}%{?-n: -n %{-n*}} %{?1}\
#%defattr(-,root,root,-)\
#%{nil}
# Bad hack to set $LANG to C during all RPM builds
%prep %%prep\
LANG=C\
export LANG\
%{nil}
%build %%build\
LANG=C\
export LANG\
%{nil}
%install %%install\
LANG=C\
export LANG\
%{nil}
%find_lang /usr/lib/rpm/redhat/find-lang.sh %{buildroot}