1 | Name: @target_alias@-gdb-collection |
---|
2 | Release: @Release@ |
---|
3 | License: GPL/LGPL |
---|
4 | Group: rtems |
---|
5 | |
---|
6 | Autoreqprov: on |
---|
7 | Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com |
---|
8 | |
---|
9 | Version: @gdb_version@ |
---|
10 | Summary: gdb for target @target_alias@ |
---|
11 | Source0: ftp://ftp.gnu.org/pub/gnu/gdb-@gdb_version@.tar.gz |
---|
12 | Patch0: gdb-@gdb_version@-rtems-base-@gdb_patch_version@.diff |
---|
13 | Patch1: gdb-@gdb_version@-rtems-cg-@gdb_patch_version@.diff |
---|
14 | Patch2: gdb-@gdb_version@-rtems-rdbg-@gdb_patch_version@.diff |
---|
15 | |
---|
16 | %if "%{_vendor}" == "redhat" |
---|
17 | BuildPreReq: ncurses-devel |
---|
18 | %endif |
---|
19 | |
---|
20 | # |
---|
21 | # The original sources are not included in the source RPM. |
---|
22 | # If we included them, then the source RPMs for each target |
---|
23 | # would duplicate MBs of source unnecessarily. This is |
---|
24 | # a duplication of over 30 MBs of source for each of |
---|
25 | # the more than 10 targets it is possible to build. |
---|
26 | # |
---|
27 | # You can get them yourself from the Internet and copy them to |
---|
28 | # your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR). |
---|
29 | # Or you can try the ftp options of rpm :-) |
---|
30 | # |
---|
31 | NoSource: 0 |
---|
32 | |
---|
33 | # Account as best possible for targets without simulators |
---|
34 | # and targets which require extra arguments. |
---|
35 | %define _sim 1 |
---|
36 | |
---|
37 | %if "@target_alias@" == "m68k-rtems" |
---|
38 | %define _sim 0 |
---|
39 | %endif |
---|
40 | %if "@target_alias@" == "i386-rtems" |
---|
41 | %define _sim 0 |
---|
42 | %endif |
---|
43 | |
---|
44 | |
---|
45 | %description |
---|
46 | RTEMS is an open source operating system for embedded systems. |
---|
47 | |
---|
48 | This is the GNU gdb for RTEMS targetting @target_alias@. |
---|
49 | |
---|
50 | %prep |
---|
51 | # untar the sources inside @target_alias@-gdb |
---|
52 | %setup -c -n @target_alias@-gdb -a 0 |
---|
53 | |
---|
54 | cd gdb-@gdb_version@ |
---|
55 | %patch0 -p1 |
---|
56 | %patch1 -p1 |
---|
57 | %patch2 -p1 |
---|
58 | |
---|
59 | %build |
---|
60 | %if "%_sim" == "1" |
---|
61 | simargs="--enable-sim" |
---|
62 | %endif |
---|
63 | |
---|
64 | %if "@target_alias@" == "powerpc-rtems" |
---|
65 | simargs="$simargs --enable-sim-timebase --enable-sim-hardware" |
---|
66 | # Enabling this causes the program image to be huge and causes |
---|
67 | # some gcc/hosts combinations to run out of memory. |
---|
68 | # simargs="$simargs --enable-sim-inline" |
---|
69 | %endif |
---|
70 | |
---|
71 | test -d build || mkdir build |
---|
72 | cd build |
---|
73 | ../gdb-@gdb_version@/configure \ |
---|
74 | --build=%_build --host=%_host \ |
---|
75 | --target=@target_alias@ \ |
---|
76 | --verbose --prefix=%{_prefix} $simargs \ |
---|
77 | --disable-nls |
---|
78 | |
---|
79 | make all |
---|
80 | make info |
---|
81 | |
---|
82 | %install |
---|
83 | cd build |
---|
84 | make prefix=$RPM_BUILD_ROOT%{_prefix} install |
---|
85 | make prefix=$RPM_BUILD_ROOT%{_prefix} install-info |
---|
86 | |
---|
87 | # host files |
---|
88 | rm -rf $RPM_BUILD_ROOT%{_prefix}/include/*.h |
---|
89 | rm -rf $RPM_BUILD_ROOT%{_prefix}/lib/lib*a |
---|
90 | |
---|
91 | # These come from other packages |
---|
92 | rm -rf $RPM_BUILD_ROOT%{_prefix}/info/bfd* |
---|
93 | rm -rf $RPM_BUILD_ROOT%{_prefix}/info/configure* |
---|
94 | rm -rf $RPM_BUILD_ROOT%{_prefix}/info/standards* |
---|
95 | |
---|
96 | # gzip info files |
---|
97 | gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info 2>/dev/null |
---|
98 | gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-? 2>/dev/null |
---|
99 | gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-?? 2>/dev/null |
---|