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 | %ifn %{defined _internal_autotools_path} |
---|
10 | %define _internal_autotools_path %{nil} |
---|
11 | %endif |
---|
12 | %endif |
---|
13 | |
---|
14 | Name: autoconf-%{autoconf_version}-%{_host}-%{release} |
---|
15 | Summary: Autoconf v%{autoconf_version} for host %{_host} |
---|
16 | Version: %{autoconf_version} |
---|
17 | Release: %{release} |
---|
18 | URL: http://www.gnu.org/software/autoconf/ |
---|
19 | BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) |
---|
20 | |
---|
21 | # |
---|
22 | # Source |
---|
23 | # |
---|
24 | %source set autoconf ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz |
---|
25 | |
---|
26 | # |
---|
27 | # Prepare the source code. |
---|
28 | # |
---|
29 | %prep |
---|
30 | build_top=$(pwd) |
---|
31 | |
---|
32 | %source setup autoconf -q -n autoconf-%{autoconf_version} |
---|
33 | %patch setup autoconf -p1 |
---|
34 | |
---|
35 | cd ${build_top} |
---|
36 | |
---|
37 | %build |
---|
38 | build_top=$(pwd) |
---|
39 | |
---|
40 | %if %{defined _internal_autotools_path} |
---|
41 | export PATH="%{_internal_autotools_path}/bin:${PATH}" |
---|
42 | %endif |
---|
43 | |
---|
44 | cd autoconf-%{autoconf_version} |
---|
45 | |
---|
46 | if test "%{_internal_autotools}" = "yes"; then |
---|
47 | ac_prefix=%{_internal_autotools_path} |
---|
48 | else |
---|
49 | ac_prefix=%{_prefix} |
---|
50 | fi |
---|
51 | |
---|
52 | if test "%{_build}" != "%{_host}" ; then |
---|
53 | CFLAGS_FOR_BUILD="-g -O2 -Wall" |
---|
54 | fi |
---|
55 | export CFLAGS CFLAGS_FOR_BUILD CC |
---|
56 | |
---|
57 | CFLAGS="$SB_CFLAGS" \ |
---|
58 | ./configure \ |
---|
59 | --build=%{_build} --host=%{_host} \ |
---|
60 | --verbose --disable-nls \ |
---|
61 | --without-included-gettext \ |
---|
62 | --prefix=${ac_prefix} |
---|
63 | |
---|
64 | %{__make} %{?_smp_mflags} all |
---|
65 | |
---|
66 | unset CFLAGS_FOR_BUILD |
---|
67 | |
---|
68 | cd ${build_top} |
---|
69 | |
---|
70 | %install |
---|
71 | build_top=$(pwd) |
---|
72 | |
---|
73 | export PATH="%{_bindir}:${PATH}" |
---|
74 | %{__rmdir} $SB_BUILD_ROOT |
---|
75 | |
---|
76 | cd autoconf-%{autoconf_version} |
---|
77 | |
---|
78 | if test "%{_internal_autotools}" = "yes"; then |
---|
79 | %{__make} install |
---|
80 | else |
---|
81 | %{__make} DESTDIR=$SB_BUILD_ROOT install |
---|
82 | fi |
---|
83 | |
---|
84 | cd ${build_top} |
---|