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 | %ifn %{defined _internal_autotools_path} |
---|
10 | %define _internal_autotools_path %{nil} |
---|
11 | %endif |
---|
12 | %endif |
---|
13 | |
---|
14 | Name: automake-%{automake_version}-%{_host}-%{release} |
---|
15 | Summary: Automake v%{automake_version} for host %{_host} |
---|
16 | Version: %{automake_version} |
---|
17 | Release: %{release} |
---|
18 | URL: http://www.gnu.org/software/automake/ |
---|
19 | |
---|
20 | # |
---|
21 | # Source |
---|
22 | # |
---|
23 | %source set automake ftp://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz |
---|
24 | |
---|
25 | # |
---|
26 | # Prepare the source code. |
---|
27 | # |
---|
28 | %prep |
---|
29 | build_top=$(pwd) |
---|
30 | |
---|
31 | %source setup automake -q -n automake-%{automake_version} |
---|
32 | %patch setup automake -p1 |
---|
33 | |
---|
34 | cd ${build_top} |
---|
35 | |
---|
36 | %build |
---|
37 | build_top=$(pwd) |
---|
38 | |
---|
39 | %if %{defined _internal_autotools_path} |
---|
40 | export PATH="%{_internal_autotools_path}/bin:${PATH}" |
---|
41 | %endif |
---|
42 | |
---|
43 | cd automake-%{automake_version} |
---|
44 | |
---|
45 | if test "%{_internal_autotools}" = "yes"; then |
---|
46 | am_prefix=%{_internal_autotools_path} |
---|
47 | else |
---|
48 | am_prefix=%{_prefix} |
---|
49 | fi |
---|
50 | |
---|
51 | if test "%{_build}" != "%{_host}" ; then |
---|
52 | CFLAGS_FOR_BUILD="-g -O2 -Wall" |
---|
53 | fi |
---|
54 | export CFLAGS CFLAGS_FOR_BUILD CC |
---|
55 | |
---|
56 | CFLAGS="$SB_CFLAGS" \ |
---|
57 | ./configure \ |
---|
58 | --build=%{_build} --host=%{_host} \ |
---|
59 | --verbose \ |
---|
60 | --prefix=${am_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 automake-%{automake_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} |
---|