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