source: rtems-source-builder/source-builder/config/autoconf-2-1.cfg @ 0dd3013

4.104.114.95
Last change on this file since 0dd3013 was b8b0f44, checked in by Chris Johns <chrisj@…>, on 09/10/13 at 06:19:20

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.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1#
2# Autoconf 2.xx Version 1.
3#
4# This configuration file configure's, make's and install's autoconf
5#
6
7%ifn %{defined _internal_autotools}
8  %define _internal_autotools no
9%endif
10
11Name:      autoconf-%{autoconf_version}-%{_host}-%{release}
12Summary:   Autoconf v%{autoconf_version} for host %{_host}
13Version:   %{autoconf_version}
14Release:   %{release}
15URL:       http://www.gnu.org/software/autoconf/
16BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
17
18#
19# Source
20#
21Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz
22VersionControl0: git clone git://git.sv.gnu.org/autoconf
23
24#
25# Prepare the source code.
26#
27%prep
28  build_top=$(pwd)
29
30  %setup -q -n autoconf-%{autoconf_version}
31  %{?patch0:%patch0 -p1}
32
33  cd ${build_top}
34
35%build
36  build_top=$(pwd)
37
38  %if %{defined _internal_autotools_path}
39    export PATH="%{_internal_autotools_path}/bin:${PATH}"
40  %endif
41
42  cd autoconf-%{autoconf_version}
43
44  if test "%{_internal_autotools}" = "yes"; then
45    ac_prefix=%{_internal_autotools_path}
46  else
47    ac_prefix=%{_prefix}
48  fi
49
50  if test "%{_build}" != "%{_host}" ; then
51    CFLAGS_FOR_BUILD="-g -O2 -Wall"
52  fi
53  export CFLAGS CFLAGS_FOR_BUILD CC
54
55  CFLAGS="$SB_OPT_FLAGS" \
56  ./configure \
57    --build=%{_build} --host=%{_host} \
58    --verbose --disable-nls \
59    --without-included-gettext \
60    --prefix=${ac_prefix}
61
62  %{__make} %{?_smp_mflags} all
63
64  unset CFLAGS_FOR_BUILD
65
66  cd ${build_top}
67
68%install
69  build_top=$(pwd)
70
71  export PATH="%{_bindir}:${PATH}"
72  %{__rmdir} $SB_BUILD_ROOT
73
74  cd autoconf-%{autoconf_version}
75
76  if test "%{_internal_autotools}" = "yes"; then
77    %{__make} install
78  else
79    %{__make} DESTDIR=$SB_BUILD_ROOT install
80  fi
81
82  cd ${build_top}
Note: See TracBrowser for help on using the repository browser.