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 | # neededforbuild -- nothing |
---|
10 | |
---|
11 | Vendor: OAR Corporation |
---|
12 | Distribution: Linux |
---|
13 | Name: @target_alias@-gdb |
---|
14 | Release: @Release@ |
---|
15 | Copyright: 1999 OARCorp |
---|
16 | Group: rtems |
---|
17 | Provides: @target_alias@-gdb |
---|
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-@gdb_patch_version@.diff |
---|
26 | # |
---|
27 | # The original sources are not included in the source RPM. |
---|
28 | # If we included them, then the source RPMs for each target |
---|
29 | # would duplicate MBs of source unnecessarily. This is |
---|
30 | # a duplication of over 30 MBs of source for each of |
---|
31 | # the more than 10 targets it is possible to build. |
---|
32 | # |
---|
33 | # You can get them yourself from the Internet and copy them to |
---|
34 | # your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR). |
---|
35 | # Or you can try the ftp options of rpm :-) |
---|
36 | # |
---|
37 | NoSource: 0 |
---|
38 | |
---|
39 | |
---|
40 | %description |
---|
41 | RTEMS is an open source operating system for embedded systems. |
---|
42 | |
---|
43 | This is the GNU gdb for RTEMS targetting @target_alias@. |
---|
44 | |
---|
45 | Authors: |
---|
46 | -------- |
---|
47 | Joel Sherrill (joel@oarcorp.com) |
---|
48 | ... |
---|
49 | |
---|
50 | %prep |
---|
51 | echo RPM_BUILD_ROOT=${RPM_BUILD_ROOT} |
---|
52 | # untar the sources inside @target_alias@-gdb |
---|
53 | %setup -c -n @target_alias@-gdb -a 0 |
---|
54 | |
---|
55 | %patch0 -p0 |
---|
56 | |
---|
57 | %build |
---|
58 | test -d build || mkdir build |
---|
59 | cd build |
---|
60 | ../gdb-@gdb_version@/configure --target=@target_alias@ \ |
---|
61 | --verbose --prefix=/opt/rtems |
---|
62 | |
---|
63 | make all |
---|
64 | make info |
---|
65 | |
---|
66 | %install |
---|
67 | cd build |
---|
68 | make prefix=$RPM_BUILD_ROOT/opt/rtems install |
---|
69 | make prefix=$RPM_BUILD_ROOT/opt/rtems install-info |
---|
70 | |
---|
71 | # gzip info files |
---|
72 | gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info 2>/dev/null |
---|
73 | gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-? 2>/dev/null |
---|
74 | gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-?? 2>/dev/null |
---|
75 | |
---|
76 | %post |
---|
77 | if test -d $RPM_INSTALL_PREFIX/rtems/info; |
---|
78 | then |
---|
79 | rm -f $RPM_INSTALL_PREFIX/rtems/info/dir |
---|
80 | f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'` |
---|
81 | test -n "$f" && for i in $f; do |
---|
82 | install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir |
---|
83 | done |
---|
84 | fi |
---|
85 | |
---|
86 | %postun |
---|
87 | if test -d $RPM_INSTALL_PREFIX/rtems/info; |
---|
88 | then |
---|
89 | rm -f $RPM_INSTALL_PREFIX/rtems/info/dir |
---|
90 | f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'` |
---|
91 | test -n "$f" && for i in $f; do |
---|
92 | install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir |
---|
93 | done |
---|
94 | fi |
---|
95 | |
---|
96 | %files |
---|
97 | %dir /opt/rtems/info |
---|
98 | %doc /opt/rtems/info/gdb.info* |
---|
99 | %doc /opt/rtems/info/mmalloc.info* |
---|
100 | %doc /opt/rtems/info/readline.info* |
---|
101 | |
---|
102 | %dir /opt/rtems/man |
---|
103 | %dir /opt/rtems/man/man1 |
---|
104 | %doc /opt/rtems/man/man1/@target_alias@-gdb.1 |
---|
105 | |
---|
106 | %dir /opt/rtems/include |
---|
107 | # We install libbfd from binutils |
---|
108 | # /opt/rtems/include/bfd.h |
---|
109 | # /opt/rtems/include/bfdlink.h |
---|
110 | |
---|
111 | %dir /opt/rtems/lib |
---|
112 | # We install libbfd from binutils |
---|
113 | # /opt/rtems/lib/libbfd* |
---|
114 | # We use libiberty from gcc |
---|
115 | # /opt/rtems/lib/libiberty* |
---|
116 | |
---|
117 | %dir /opt/rtems/bin |
---|
118 | /opt/rtems/bin/@target_alias@-gdb |
---|
119 | |
---|