1 | # |
---|
2 | # GDB 7.xx Version 1. |
---|
3 | # |
---|
4 | # This configuration file configure's, make's and install's gdb. |
---|
5 | # |
---|
6 | |
---|
7 | %include %{_configdir}/checks.cfg |
---|
8 | |
---|
9 | Name: %{_target}-gdb-%{gdb_version}-%{release} |
---|
10 | Summary: GDB v%{gdb_version} for target %{_target} on host %{_host} |
---|
11 | Version: %{gdb_version} |
---|
12 | Release: %{release} |
---|
13 | URL: http://www.gnu.org/software/gdb/ |
---|
14 | BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) |
---|
15 | |
---|
16 | # |
---|
17 | # Source |
---|
18 | # |
---|
19 | %ifn %{defined Source0} |
---|
20 | Source0: http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2 |
---|
21 | VersionControl0 git clone git://sourceware.org/git/gdb.git |
---|
22 | %endif |
---|
23 | |
---|
24 | # |
---|
25 | # Prepare the source code. |
---|
26 | # |
---|
27 | %prep |
---|
28 | %setup -q -c -T -n %{name}-%{version} |
---|
29 | cd gdb-%{gdb_version} |
---|
30 | %{?patch0:%patch0 -p1} |
---|
31 | cd .. |
---|
32 | |
---|
33 | %build |
---|
34 | export PATH="%{_bindir}:${PATH}" |
---|
35 | mkdir -p build |
---|
36 | cd build |
---|
37 | %if "%{_build}" != "%{_host}" |
---|
38 | CFLAGS_FOR_BUILD="-g -O2 -Wall" \ |
---|
39 | %endif |
---|
40 | CFLAGS="$SB_OPT_FLAGS" \ |
---|
41 | ../gdb-%{gdb_version}/configure \ |
---|
42 | --build=%{_build} --host=%{_host} \ |
---|
43 | --target=%{_target} \ |
---|
44 | --verbose --disable-nls \ |
---|
45 | --without-included-gettext \ |
---|
46 | --disable-win32-registry \ |
---|
47 | --disable-werror \ |
---|
48 | --enable-sim \ |
---|
49 | --with-expat \ |
---|
50 | --with-python \ |
---|
51 | --prefix=%{_prefix} --bindir=%{_bindir} \ |
---|
52 | --exec-prefix=%{_exec_prefix} \ |
---|
53 | --includedir=%{_includedir} --libdir=%{_libdir} \ |
---|
54 | --mandir=%{_mandir} --infodir=%{_infodir} |
---|
55 | |
---|
56 | %{__make} %{?_smp_mflags} all |
---|
57 | cd .. |
---|
58 | |
---|
59 | %install |
---|
60 | export PATH="%{_bindir}:${PATH}" |
---|
61 | rm -rf $SB_BUILD_ROOT |
---|
62 | |
---|
63 | cd build |
---|
64 | %{__make} DESTDIR=$SB_BUILD_ROOT install |
---|
65 | |
---|
66 | # Dropped in FSF-binutils-2.9.5, but Cygwin still ships it. |
---|
67 | rm -rf $SB_BUILD_ROOT%{_infodir}/configure.info* |
---|
68 | |
---|
69 | rm -f $SB_BUILD_ROOT%{_infodir}/dir |
---|
70 | touch $SB_BUILD_ROOT%{_infodir}/dir |
---|
71 | |
---|
72 | cd .. |
---|