1 | # |
---|
2 | # spec file for package rtems |
---|
3 | # |
---|
4 | # Copyright (c) 1999 OARCorp, Huntsville, AL |
---|
5 | # |
---|
6 | # please send bugfixes or comments to joel@OARcorp.com |
---|
7 | # |
---|
8 | |
---|
9 | %define _prefix @prefix@ |
---|
10 | %define _defaultbuildroot %{_tmppath}/%{name}-%{version} |
---|
11 | |
---|
12 | Vendor: OAR Corporation |
---|
13 | Distribution: Linux |
---|
14 | Name: @target_alias@-gdb-collection |
---|
15 | Release: @Release@ |
---|
16 | License: GPL/LGPL |
---|
17 | Group: rtems |
---|
18 | |
---|
19 | Autoreqprov: on |
---|
20 | Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com |
---|
21 | |
---|
22 | Version: @gdb_version@ |
---|
23 | Summary: gdb for target @target_alias@ |
---|
24 | Source0: ftp://ftp.gnu.org/pub/gnu/gdb-@gdb_version@.tar.gz |
---|
25 | Patch0: gdb-@gdb_version@-rtems-base-@gdb_patch_version@.diff |
---|
26 | Patch1: gdb-@gdb_version@-rtems-cg-@gdb_patch_version@.diff |
---|
27 | Patch2: gdb-@gdb_version@-rtems-rdbg-@gdb_patch_version@.diff |
---|
28 | Buildroot: %{_defaultbuildroot} |
---|
29 | |
---|
30 | %if "%{_vendor}" == "redhat" |
---|
31 | BuildPreReq: ncurses-devel |
---|
32 | %endif |
---|
33 | |
---|
34 | # |
---|
35 | # The original sources are not included in the source RPM. |
---|
36 | # If we included them, then the source RPMs for each target |
---|
37 | # would duplicate MBs of source unnecessarily. This is |
---|
38 | # a duplication of over 30 MBs of source for each of |
---|
39 | # the more than 10 targets it is possible to build. |
---|
40 | # |
---|
41 | # You can get them yourself from the Internet and copy them to |
---|
42 | # your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR). |
---|
43 | # Or you can try the ftp options of rpm :-) |
---|
44 | # |
---|
45 | NoSource: 0 |
---|
46 | |
---|
47 | |
---|
48 | %description |
---|
49 | RTEMS is an open source operating system for embedded systems. |
---|
50 | |
---|
51 | This is the GNU gdb for RTEMS targetting @target_alias@. |
---|
52 | |
---|
53 | %prep |
---|
54 | # untar the sources inside @target_alias@-gdb |
---|
55 | %setup -c -n @target_alias@-gdb -a 0 |
---|
56 | |
---|
57 | cd gdb-@gdb_version@ |
---|
58 | %patch0 -p1 |
---|
59 | %patch1 -p1 |
---|
60 | %patch2 -p1 |
---|
61 | |
---|
62 | %build |
---|
63 | test -d build || mkdir build |
---|
64 | cd build |
---|
65 | ../gdb-@gdb_version@/configure --target=@target_alias@ \ |
---|
66 | --verbose --prefix=%{_prefix} @extra_configure_arguments@ \ |
---|
67 | --disable-nls |
---|
68 | |
---|
69 | make all |
---|
70 | make info |
---|
71 | |
---|
72 | %install |
---|
73 | cd build |
---|
74 | make prefix=$RPM_BUILD_ROOT%{_prefix} install |
---|
75 | make prefix=$RPM_BUILD_ROOT%{_prefix} install-info |
---|
76 | |
---|
77 | # host files |
---|
78 | rm -rf $RPM_BUILD_ROOT%{_prefix}/include/*.h |
---|
79 | rm -rf $RPM_BUILD_ROOT%{_prefix}/lib/lib*a |
---|
80 | |
---|
81 | # These come from other packages |
---|
82 | rm -rf $RPM_BUILD_ROOT%{_prefix}/info/bfd* |
---|
83 | rm -rf $RPM_BUILD_ROOT%{_prefix}/info/configure* |
---|
84 | rm -rf $RPM_BUILD_ROOT%{_prefix}/info/standards* |
---|
85 | |
---|
86 | # gzip info files |
---|
87 | gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info 2>/dev/null |
---|
88 | gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-? 2>/dev/null |
---|
89 | gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-?? 2>/dev/null |
---|
90 | |
---|
91 | %clean |
---|
92 | # let rpm --clean remove BuildRoot iif using the default BuildRoot |
---|
93 | test "$RPM_BUILD_ROOT" = "%{_defaultbuildroot}" && \ |
---|
94 | rm -rf $RPM_BUILD_ROOT |
---|