1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
12 >Package Organization</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="The eCos Component Writer's Guide"
20 HREF="cdl-guide.html"><LINK
23 HREF="overview.warning.html"><LINK
25 TITLE="Package Versioning"
26 HREF="package.versions.html"></HEAD
37 SUMMARY="Header navigation table"
49 > Component Writer's Guide</TH
57 HREF="overview.warning.html"
71 HREF="package.versions.html"
84 NAME="PACKAGE">Chapter 2. Package Organization</H1
94 HREF="package.html#PACKAGE.HIERARCHY"
95 >Packages and the Component Repository</A
99 HREF="package.versions.html"
100 >Package Versioning</A
104 HREF="package.contents.html"
105 >Package Contents and Layout</A
109 HREF="package.distrib.html"
110 >Making a Package Distribution</A
115 >For a package to be usable in the <SPAN
118 > component framework it must
119 conform to certain rules imposed by that framework. Packages must be
120 distributed in a form that is understood by the component repository
121 administration tool. There must be a top-level <SPAN
125 describes the package to the component framework. There are certain
126 limitations related to how a package gets built, so that the package
127 can still be used in a variety of host environments. In addition to
128 these rules, the component framework provides a number of guidelines.
129 Packages do not have to conform to the guidelines, but sticking to
130 them can simplify certain operations.</P
132 >This chapter deals with the general organization of a package, for
133 example how to distinguish between private and exported header files.
137 > describes the <SPAN
144 > details the build process.</P
150 NAME="PACKAGE.HIERARCHY">Packages and the Component Repository</H1
155 > installations include a component repository. This is a
156 directory structure for all installed packages. The component
157 framework comes with an administration tool that allows new packages
158 or new versions of a package to be installed, old packages to be
159 removed, and so on. The component repository includes a simple
160 database, maintained by the administration tool, which contains
161 details of the various packages.</P
163 CLASS="INFORMALFIGURE"
178 >Each package has its own little directory hierarchy within the
179 component repository. Keeping several packages in a single directory
180 is illegal. The error, infra and kernel packages all live at the
181 top-level of the repository. For other types of packages there are
182 some pre-defined directories: <TT
185 > is used for compatibility
186 packages, which implement other interfaces such as µITRON or POSIX
194 is used for packages that port <SPAN
197 > to different architectures or
198 platforms, and this directory is further organized on a
199 per-architecture basis; <TT
203 intended for device drivers; <TT
206 > is used for language support
207 libraries, for example the C library. There are no strict rules
208 defining where new packages should get installed. Obviously if an
209 existing top-level directory such as <TT
212 > is applicable then the new package
213 should go in there. If a new category is desirable then it is possible
214 to create a new sub-directory in the component repository. For
215 example, an organization planning to release a number of <SPAN
219 packages may want them all to appear below a sub-directory
220 corresponding to the organization's name — in the hope that
221 the name will not change too often. It is possible to add new packages
222 directly to the top-level of the component repository, but this should
228 > file holds the component repository
229 database and is managed by the administration tool. The various
230 configuration tools read in this file when they start-up to obtain
231 information about the various packages that have been installed. When
232 developing a new package it is necessary to add some information to
233 the file, as described in <A
234 HREF="language.database.html"
235 >the Section called <I
246 various configuration templates.</P
254 >Earlier releases of <SPAN
257 > came with two separate files,
268 > database replaces both of these.</P
293 > database does not yet provide
294 all of the information needed by the component framework. Its format
295 is subject to change in future releases, and the file may be replaced
296 completely if necessary. There are a number of other likely future
297 developments related to the component repository and the database. The
298 way targets are described is subject to change. Sometimes it is
299 desirable for component writers to do their initial development in a
300 directory outside the component repository, but there is no specific
301 support in the framework for that yet.</P
313 SUMMARY="Footer navigation table"
324 HREF="overview.warning.html"
333 HREF="cdl-guide.html"
342 HREF="package.versions.html"
362 >Package Versioning</TD