1 | %define _datadir %{_prefix}/share |
---|
2 | %define _infodir %{_datadir}/info |
---|
3 | |
---|
4 | %define srcvers @rtems_version@ |
---|
5 | %define rpmvers %{expand:%%(echo @rtems_version@ | tr - _ )} |
---|
6 | |
---|
7 | Name: %{rpmprefix}rtemsdoc |
---|
8 | Release: @rtems_rpm_release@ |
---|
9 | Epoch: 0 |
---|
10 | License: Distributable |
---|
11 | Group: %{rpmgroup}/Documentation |
---|
12 | |
---|
13 | Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com |
---|
14 | BuildPreReq: texinfo >= 4.2 |
---|
15 | BuildPreReq: tetex |
---|
16 | BuildPreReq: perl |
---|
17 | BuildPreReq: gcc |
---|
18 | |
---|
19 | Version: %{rpmvers} |
---|
20 | Summary: A free operating system for embedded systems |
---|
21 | Source: rtems-%{srcvers}.tar.bz2 |
---|
22 | |
---|
23 | # |
---|
24 | # The original sources are not included in the source RPM. |
---|
25 | # If we included them, then the source RPMs for each target |
---|
26 | # would duplicate MBs of source unnecessarily. This is |
---|
27 | # a duplication of over 30 MBs of source for each of |
---|
28 | # the more than 10 targets it is possible to build. |
---|
29 | # |
---|
30 | # You can get them yourself from the Internet and copy them to |
---|
31 | # your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR). |
---|
32 | # Or you can try the ftp options of rpm :-) |
---|
33 | # |
---|
34 | NoSource: 0 |
---|
35 | Prefix: %{_prefix} |
---|
36 | Prefix: %{_infodir} |
---|
37 | Prefix: %{_datadir} |
---|
38 | BuildArch: noarch |
---|
39 | |
---|
40 | %description |
---|
41 | RTEMS is a free operating system for embedded systems. |
---|
42 | |
---|
43 | This package contains the documentation |
---|
44 | |
---|
45 | %prep |
---|
46 | %setup -c -T -n %{name}-%{version} -b0 |
---|
47 | test -d build || mkdir build |
---|
48 | %build |
---|
49 | cd build |
---|
50 | # rtems does not support building inside the source tree |
---|
51 | export PATH=%{_prefix}/bin:$PATH |
---|
52 | ../rtems-%{srcvers}/doc/configure \ |
---|
53 | --prefix=%{_prefix} \ |
---|
54 | --infodir=%{_infodir} \ |
---|
55 | --datadir=%{_datadir} \ |
---|
56 | --enable-docs |
---|
57 | make RTEMS_BSP= |
---|
58 | %install |
---|
59 | rm -rf ${RPM_BUILD_ROOT} |
---|
60 | cd build |
---|
61 | make RTEMS_BSP= DESTDIR=${RPM_BUILD_ROOT} install |
---|
62 | rm -f ${RPM_BUILD_ROOT}/%{_infodir}/template* |
---|
63 | rm -f ${RPM_BUILD_ROOT}/%{_datadir}/rtems/*/template* |
---|
64 | rm -rf ${RPM_BUILD_ROOT}/%{_datadir}/rtems/html/supplements/template* |
---|
65 | |
---|
66 | gzip -9qf ${RPM_BUILD_ROOT}/%{_infodir}/* |
---|
67 | |
---|
68 | ## base |
---|
69 | |
---|
70 | %package base |
---|
71 | Summary: Documentation for RTEMS ada support |
---|
72 | Group: %{rpmgroup}/Documentation |
---|
73 | |
---|
74 | %description base |
---|
75 | RTEMS is a free operating system for embedded systems. |
---|
76 | |
---|
77 | This package contains the files shared between different documentation |
---|
78 | packages. |
---|
79 | |
---|
80 | %files base |
---|
81 | %dir %{_infodir} |
---|
82 | %dir %{_datadir}/rtems |
---|
83 | %dir %{_datadir}/rtems/html |
---|
84 | %{_datadir}/rtems/html/images |
---|
85 | %{_datadir}/rtems/html/*.html |
---|
86 | |
---|