Chris Johns 0606a65718 Clean path when building autoconf and automake.
Autoconf hard codes paths into itself. This change is a first
pass at allowing a clean environment to let automake build. The
ability to 'make install DESTDIR=xxx' autoconf then use it to
build automake needs a clean environment. The purpose is to
allow a prefix that needs root without building and packaging
when root.
2013-03-05 19:43:43 +11:00

75 lines
1.5 KiB
INI

#
# Autoconf 2.xx Version 1.
#
# This configuration file configure's, make's and install's autoconf
#
%ifn %{defined _internal_autotools}
%define _internal_autotools no
%endif
Name: autoconf-%{autoconf_version}-%{_host}-%{release}
Summary: Autoconf v%{autoconf_version} for host %{_host}
Version: %{autoconf_version}
Release: %{release}
URL: http://www.gnu.org/software/autoconf/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz
VersionControl0: git clone git://git.sv.gnu.org/autoconf
#
# Prepare the source code.
#
%prep
%setup -q -c -n %{name}-%{version}
cd autoconf-%{autoconf_version}
%{?patch0:%patch0 -p1}
cd ..
%build
if test "%{_internal_autotools}" == "yes"; then
export PATH="%{_bindir}:${PATH}"
else
export PATH=$SB_ORIG_PATH
fi
cd autoconf-%{autoconf_version}
if test "%{_internal_autotools}" == "yes"; then
ac_prefix=$SB_TMPPREFIX
else
ac_prefix=%{_prefix}
fi
%if "%{_build}" != "%{_host}"
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
%endif
CFLAGS="$SB_OPT_FLAGS" \
./configure \
--build=%{_build} --host=%{_host} \
--verbose --disable-nls \
--without-included-gettext \
--prefix=${ac_prefix}
%{__make} %{?_smp_mflags} all
cd ..
%install
export PATH="%{_bindir}:${PATH}"
rm -rf $SB_BUILD_ROOT
cd autoconf-%{autoconf_version}
if "%{_internal_autotools}" == "yes"; then
%{__make} install
else
%{__make} DESTDIR=$SB_BUILD_ROOT install
fi
cd ..