1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
About This Document
===================
This document describes version 1.0 of the format for software source packages.
Legal Notice
============
Copyright (C) 2012 Patrick "P. J." McDermott
This document may be reproduced, distributed, modified, and otherwise dealt in
under the terms of the Expat/MIT License:
http://www.jclark.com/xml/copying.txt
Specification Status
====================
This specification is in draft status. It is a work-in-progress and is subject
to change. Comments and revisions are welcome.
TODO
----
* Finish describing binary package control fields.
* Describe the control file format.
* Describe the formats of the config and changelog files.
Background
==========
A source package consists of software source code, a build system, and package
metadata. From it is built one or more binary packages, which can be installed
into an operating system.
Rationale
=========
This source package format is modeled after the package format of the OpenBricks
Embedded Linux Framework. However, this format more natively supports the
building of multiple binary packages from one source package. Additionally,
source packages in this format are intended to be maintained independently (like
Debian packages are) rather than in one monolithic software repository (such as
that of OpenBricks). In this and other respects, this format draws inspiration
from Debian's source package formats.
Directory Structure
===================
<pkgname>_<pkgver>-<pkgrev>/
+- <binpkg>.pkg/
| +- control
| | Metadata about the binary package.
| +- install
| | A list of patterns to match files to be installed in the binary
| | package.
| +- postinst
| +- postrm
| +- preinst
| \- prerm
+- build
| A makefile with target rules to build the binary package(s).
+- changelog
| A log of changes made to the source package.
+- config
| A list of build-time and run-time configuration files.
+- control
| Metadata about the source package.
+- copyright
| Information about copyrights and licenses in the source package.
+- format
| A magic file to identify the source format version. Should simply
| contain the string "1.0".
+- patches/
| Patches to be applied to package sources before building.
+- <pkgname>_<pkgver>.<ext>
| Upstream source archive (for non-native packages).
\- src/
Package sources (for native packages).
Control File Format
===================
See documentation on Debian packaging.
Binary Package Metadata
=======================
The fields in the binary package metadata are:
* Package (required)
The name of the binary package. Binary package names may only consist of
lowercase Latin letters, digits, plus and minus signs, and periods. Names
must be at least two characters long and must start with either a letter or
a digit.
* Architecture (required)
The names of the architectures for which this package is built. The list of
names may consist of values selected from the following:
- A three-tuple binary architecture name to specify that the package can
be built for the binary architecture and any application platform.
- An application platform architecture name to specify that the package
can be built for the application platform and its associated binary
architecture.
Alternatively, the list may consist solely of one of the following values:
- The string "all" to specify that the package can be built on any binary
architecture and any application platform and can then be installed on
binary architectures and/or application platforms other than those on
which it is built.
- The string "any" to specify that the package cen be built for any binary
architecture and any application platform.
* Essential (optional)
A flag to indicate whether the package is essential for the functioning of a
system on which it is installed. If this field is set to "yes", opkg will
refuse to remove the package except when upgrading it. If this field is set
to any other value or is omitted, the package may be removed by a user.
* Depends (optional)
A list of packages that must be installed and configured before the package
may itself be configured.
* Recommends (optional)
* Suggests (optional)
* Pre-Depends (optional)
A list of packages that must be installed before the package may itself be
installed.
* Conflicts (optional)
* Provides (optional)
* Replaces (optional)
* Description (required)
A description of the binary package. This is a multiline field. The first
line is a short synopsis, and all following lines are an extended
description.
Source Package Metadata
=======================
The fields in the source package metadata are:
* Source (required)
The name of the source package. Source package names may only consist of
lowercase Latin letters, digits, plus and minus signs, and periods. Names
must be at least two characters long and must start with either a letter or
a digit.
* Maintainer (required)
The name and e-mail address of the package maintainer. This field must
follow the syntax of the "mailbox" symbol in RFC 822 section 6.1.
* Build-Depends (optional)
A list of packages that must be installed before the package can be built.
* Homepage
The URL of the Web site for the package. Accessible at this site should be
origin source code and documentation and/or information. Though the
information in this field is machine-usable, the URL must not be surrounded
by angle brackets or any other characters.
|