1 | # |
---|
2 | # Automake 1.xx Version 1. |
---|
3 | # |
---|
4 | # This configuration file configure's, make's and install's automake |
---|
5 | # |
---|
6 | |
---|
7 | %ifn %{defined _internal_autotools} |
---|
8 | %define _internal_autotools no |
---|
9 | %endif |
---|
10 | |
---|
11 | Name: automake-%{automake_version}-%{_host}-%{release} |
---|
12 | Summary: Automake v%{automake_version} for host %{_host} |
---|
13 | Version: %{automake_version} |
---|
14 | Release: %{release} |
---|
15 | URL: http://www.gnu.org/software/automake/ |
---|
16 | BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) |
---|
17 | |
---|
18 | # |
---|
19 | # Source |
---|
20 | # |
---|
21 | Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz |
---|
22 | VersionControl0: git clone git://git.savannah.gnu.org/automake.git |
---|
23 | |
---|
24 | # |
---|
25 | # Prepare the source code. |
---|
26 | # |
---|
27 | %prep |
---|
28 | build_top=$(pwd) |
---|
29 | |
---|
30 | %setup -q -n automake-%{automake_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 automake-%{automake_version} |
---|
43 | |
---|
44 | if test "%{_internal_autotools}" = "yes"; then |
---|
45 | am_prefix=%{_internal_autotools_path} |
---|
46 | else |
---|
47 | am_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 \ |
---|
59 | --prefix=${am_prefix} |
---|
60 | |
---|
61 | %{__make} %{?_smp_mflags} all |
---|
62 | |
---|
63 | unset CFLAGS_FOR_BUILD |
---|
64 | |
---|
65 | cd ${build_top} |
---|
66 | |
---|
67 | %install |
---|
68 | build_top=$(pwd) |
---|
69 | |
---|
70 | export PATH="%{_bindir}:${PATH}" |
---|
71 | %{__rmdir} $SB_BUILD_ROOT |
---|
72 | |
---|
73 | cd automake-%{automake_version} |
---|
74 | |
---|
75 | if test "%{_internal_autotools}" = "yes"; then |
---|
76 | %{__make} install |
---|
77 | else |
---|
78 | %{__make} DESTDIR=$SB_BUILD_ROOT install |
---|
79 | fi |
---|
80 | |
---|
81 | cd ${build_top} |
---|