Chris Johns b8b0f4452f config: Use ${build_top} to change dir to parent.
On NetBSD with ksh changing into a symlink made PWD the link's
target path so a 'cd ..' returned you to that parent and not
the parent you started from. Record the build top and then
change back to that path.

Change the package names to the actual packages and remove the
extra directory in the build tree. This makes the paths simpler.
2013-09-10 16:19:20 +10:00

83 lines
1.7 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
build_top=$(pwd)
%setup -q -n autoconf-%{autoconf_version}
%{?patch0:%patch0 -p1}
cd ${build_top}
%build
build_top=$(pwd)
%if %{defined _internal_autotools_path}
export PATH="%{_internal_autotools_path}/bin:${PATH}"
%endif
cd autoconf-%{autoconf_version}
if test "%{_internal_autotools}" = "yes"; then
ac_prefix=%{_internal_autotools_path}
else
ac_prefix=%{_prefix}
fi
if test "%{_build}" != "%{_host}" ; then
CFLAGS_FOR_BUILD="-g -O2 -Wall"
fi
export CFLAGS CFLAGS_FOR_BUILD CC
CFLAGS="$SB_OPT_FLAGS" \
./configure \
--build=%{_build} --host=%{_host} \
--verbose --disable-nls \
--without-included-gettext \
--prefix=${ac_prefix}
%{__make} %{?_smp_mflags} all
unset CFLAGS_FOR_BUILD
cd ${build_top}
%install
build_top=$(pwd)
export PATH="%{_bindir}:${PATH}"
%{__rmdir} $SB_BUILD_ROOT
cd autoconf-%{autoconf_version}
if test "%{_internal_autotools}" = "yes"; then
%{__make} install
else
%{__make} DESTDIR=$SB_BUILD_ROOT install
fi
cd ${build_top}