autoproj 1.3.4 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,6 +35,13 @@ a:hover {
35
35
  text-decoration:underline;
36
36
  }
37
37
 
38
+ img.full {
39
+ margin-left: auto;
40
+ margin-right: auto;
41
+ margin-top: 2em;
42
+ margin-bottom: 2em;
43
+ }
44
+
38
45
  a img{
39
46
  border:0;
40
47
  }
@@ -253,6 +260,10 @@ padding:20px;
253
260
  background:#eee;
254
261
  color:#222;
255
262
  border:2px solid #ddd;
263
+ margin-top: 3em;
264
+ margin-bottom: 3em;
265
+ margin-left: 2em;
266
+ margin-right: 2em;
256
267
  }
257
268
 
258
269
  .warning{
@@ -60,7 +60,7 @@
60
60
  <div id="sidebar">
61
61
 
62
62
  <h2 class="sidelink menuheader"><a id="sitemenu"></a>Main Menu</h2>
63
- <div id="menu">{menu: {max_levels: 2, show_current_subtree_only: true, nested: true, used_nodes: files}}</div>
63
+ <div id="menu">{menu: {min_levels: 2, max_levels: 2, show_current_subtree_only: false, nested: true, used_nodes: files}}</div>
64
64
  <br>
65
65
  <a class="hide" href="#top" accesskey="1">Top of page</a>
66
66
 
@@ -10,7 +10,8 @@ definition exists in one of the osdeps files.
10
10
 
11
11
  _Long explanation_: XXXX is listed as an operating system dependency by one of
12
12
  the packages that you requested to build. Two solutions: (i) the package should
13
- *not* depend on it, and you should modify the package's manifest.xml file. (ii)
13
+ *not* depend on it, and you should modify the [package's
14
+ manifest.xml](package_sets/manifest-xml.html) file. (ii)
14
15
  the package should depend on it and you should list the OS package in [the
15
16
  relevant osdeps file](osdeps.html)
16
17
 
@@ -2,3 +2,7 @@
2
2
  title: Introduction
3
3
  sort_info: 0
4
4
 
5
+ /package_sets:
6
+ title: Writing the package sets
7
+ sort_info: 100
8
+
@@ -28,20 +28,22 @@ specification. More specifically, the package manifest files are common between
28
28
  ROS package management and autoproj (more details in the following of this
29
29
  document).
30
30
 
31
- Components of an Autoproj installation
31
+ Overview of an autoproj installation
32
32
  -------------------------------------
33
- A autoproj installation is seeded by _package sets_. A package set is a local or remote
34
- directory in which there is:
35
33
 
36
- * a list of available packages, and information on how to build these packages.
37
- This list, and the build information, are Ruby scripts that use the autobuild
38
- API. [More ...](autobuild.html)
39
- * version control information: where to get the source code for each of the
40
- packages defined in the set.
34
+ The idea in an autoproj installation is that people share _definitions_ for a
35
+ set of packages that can depend on each other. Then, anyone can cherry-pick in
36
+ these definitions to build its own installation (in practice, one builds a
37
+ complete configuration per-project).
41
38
 
42
- Then, an autoproj configuration is simply a list of package sets (i.e. a list of
43
- packages that are available to build), and a file that selects which packages
44
- should be built. This file is the <tt>manifest</tt>.
39
+ Each package definition includes:
40
+
41
+ * how to get the package's source code
42
+ * how to build the package
43
+ * on what the package depends. This can be either another package built by
44
+ autoproj, or an operating system package.
45
+
46
+ See [this page](structure.html) for more information.
45
47
 
46
48
  Bootstrapping
47
49
  -------------
@@ -97,6 +99,6 @@ As a guideline, we recommend that inter-package dependencies are managed by
97
99
  using pkg-config.
98
100
 
99
101
  To describe the package, and more importantly to setup cross-package
100
- dependencies, an optional manifest file can be added. This manifest file is
101
- named manifest.xml. Its format is described later in this user's guide.
102
+ dependencies, [an optional manifest file can be
103
+ added](package_sets/manifest-xml.html).
102
104
 
@@ -0,0 +1,14 @@
1
+ <package>
2
+ <description brief="one line of text">
3
+ long description goes here,
4
+ <em>XHTML is allowed</em>
5
+ </description>
6
+ <author>Alice/alice@somewhere.bar, Bob/bob@nowhere.foo</author>
7
+ <license>BSD</license>
8
+ <url>http://sites.google.com/site/rubyinmotion</url>
9
+ <logo>http://sites.google.com/site/rubyinmotion</logo>
10
+
11
+ <depend package="pkgname"/> <!-- add dependency on another autoproj-built package -->
12
+ <depend package="common"/>
13
+ <rosdep name="python" /> <!-- add dependency on a prepackaged operating system package -->
14
+ </package>
@@ -29,17 +29,71 @@ end
29
29
 
30
30
  The above snippet being equivalent to calling <tt>cmake -DVAR=VALUE</tt>
31
31
 
32
- <b>Note to advanced users</b>
33
- <br />
34
- The "pkg" variable holds an object that represents the package. This
35
- object is an instance of the Autobuild::CMake. See [the autobuild
36
- API](http://doudou.github.com/autobuild/Autobuild/CMake.html) for more
37
- details.
38
- {.note}
39
-
40
- Defining autotools packages
32
+ The "pkg" variable in the example above is an instance of
33
+ [Autobuild::CMake](http://doudou.github.com/autobuild/Autobuild/CMake.html)
34
+ {.block}
35
+
36
+ Defining autotools packages {#autotools}
41
37
  ---------------------------
42
- TBD
38
+
39
+ {coderay:: ruby}
40
+ autotools_package "package_name"
41
+ autotools_package "package_name" do |pkg|
42
+ pkg.configureflags << "--enable-feature" << "VAR=VALUE"
43
+ # additional configuration
44
+ end
45
+ {coderay}
46
+
47
+ The 'pkg' variable in the example above is an instance of
48
+ [Autobuild::Autotools](http://doudou.github.com/autobuild/Autobuild/Autotools.html)
49
+ {.block}
50
+
51
+ Defining Ruby packages
52
+ ----------------------
53
+
54
+ {coderay:: ruby}
55
+ ruby_package "package_name"
56
+ ruby_package "package_name" do |pkg|
57
+ # additional configuration
58
+ end
59
+ {coderay}
60
+
61
+ This package handles pure ruby libraries that do not need to be installed at
62
+ all. Autoproj assumes that the directory layout of the package follows the following
63
+ convention:
64
+
65
+ * programs are in bin/
66
+ * the library itself is in lib/
67
+ * if an extension needs to be built, a Rakefile has to be there with a "setup"
68
+ target to do the job.
69
+
70
+ Defining oroGen packages
71
+ ------------------------
72
+
73
+ {coderay:: ruby}
74
+ orogen_package "package_name"
75
+ orogen_package "package_name" do |pkg|
76
+ # customization code
77
+ end
78
+ {coderay}
79
+
80
+ oroGen is a module generator for the Orocos component framework. See [the oroGen
81
+ documentation](http://doudou.github.com/orogen) for more information.
82
+
83
+ The 'pkg' variable in the example above is an instance of
84
+ [Autobuild::Orogen](http://doudou.github.com/autobuild/Autobuild/Orogen.html)
85
+ {.block}
86
+
87
+ Custom package building
88
+ -----------------------
89
+
90
+ {coderay:: ruby}
91
+ import_package "package_name" do |pkg|
92
+ pkg.post_install do
93
+ # add commands to build and install the package
94
+ end
95
+ end
96
+ {coderay}
43
97
 
44
98
  Declaring documentation targets
45
99
  -------------------------------
@@ -74,9 +128,21 @@ pkg.depends_on_os_package "package_name"
74
128
 
75
129
  Both methods should be used only for dynamic dependencies, i.e. dependencies
76
130
  that are dependent on build options (see below). Static dependencies should be
77
- defined in the package's manifest.xml
131
+ defined in [the package's manifest.xml](manifest-xml.html)
78
132
  {.warning}
79
133
 
134
+ Finally, it is possible to give aliases to a package's name, by using the
135
+ Autobuild::Package#provides method. If one does
136
+
137
+ {coderay:: ruby}
138
+ cmake_package "mypkg" do |pkg|
139
+ pkg.provides "pkgconfig/libmypkg"
140
+ end
141
+ {coderay}
142
+
143
+ then a package that declares a dependency on "pkgconfig/libmypkg" will actually
144
+ depend on "mypkg".
145
+
80
146
  Defining and using options
81
147
  --------------------------
82
148
 
@@ -0,0 +1,164 @@
1
+ ---
2
+ title: Package import
3
+ sort_info: 250
4
+ ---
5
+
6
+ As [we already mentioned](index.html), the source.yml file contains information
7
+ on where to import the source packages from. This information is included in the
8
+ version\_control field of the source.yml, and is of the general form:
9
+
10
+ {coderay:: yaml}
11
+ version_control:
12
+ package_name:
13
+ vcs_def
14
+ package_name:
15
+ vcs_def:
16
+ {coderay}
17
+
18
+ Autoproj follows the following rules to find the importer definition for a given
19
+ package:
20
+
21
+ - it looks *in order* in the package sets listed in the manifest file, and will
22
+ take the definition from the *first* package set that has a definition for
23
+ the package.
24
+ - in the source.yml file, it will match the package's name with the
25
+ package\_name fields. It will consider every matching block (i.e. every
26
+ package\_name that matches), overriding earlier options by later ones.
27
+
28
+ As an example, let's consider the following manifest:
29
+
30
+ {coderay:: ruby}
31
+ package_sets:
32
+ - rubim.drivers
33
+ - rubim.orocos
34
+ - rubim.base
35
+ {coderay}
36
+
37
+ Now, let's assume that the rubim.orocos package set has a source.yml file with:
38
+
39
+ {coderay:: ruby}
40
+ version_control:
41
+ orocos/:
42
+ type: git
43
+ url: git://github.com/$PACKAGE.git
44
+ orocos/orocos.rb:
45
+ branch: roby
46
+ {coderay}
47
+
48
+ Finally, the rubim.drivers package set has:
49
+
50
+ {coderay:: ruby}
51
+ version_control:
52
+ orocos/logger:
53
+ type: git
54
+ url: git://github.com/$PACKAGE.git
55
+ branch: perf
56
+ {coderay}
57
+
58
+ Then, the following will happen:
59
+
60
+ * all packages that are prefixed with "orocos/" will match the general
61
+ definition of rubim.orocos.
62
+ * in addition, the 'branch' flag of orocos/orocos.rb will be overriden from
63
+ 'master' (the default) to 'roby'
64
+ * in the case of orocos/logger, since there is a matching definition in
65
+ rubim.drivers, the definition in rubim.orocos *is not used at all*. Only the
66
+ definition found in rubim.drivers' source.yml file matters.
67
+
68
+ The remaining of this page will detail the various options that exist to import
69
+ a source package.
70
+
71
+ Git {#all_importers}
72
+ \---
73
+
74
+ The general setup for git imports is:
75
+
76
+ {coderay:: yaml}
77
+ version_control:
78
+ package_name:
79
+ type: git
80
+ url: repository_url_or_path
81
+ branch: branch_name
82
+ tag: tag_name # it is branch OR tag
83
+ {coderay}
84
+
85
+ Autoproj will maintain an 'autobuild' remote on the checked out repository:
86
+ i.e., it will make sure that the URL of this remote is always linked to the
87
+ right URL from the config file, and will update the relevant branch on update
88
+ (beware: the other branches won't get updated).
89
+
90
+ Moreover, autoproj will make sure that updating your local repository always
91
+ resolves as a fast-forward (i.e., it will never create a merge)
92
+
93
+ Subversion
94
+ ----------
95
+
96
+ The general setup for subversion imports is:
97
+
98
+ {coderay:: yaml}
99
+ version_control:
100
+ package_name:
101
+ type: svn
102
+ url: repository_url_or_path
103
+ {coderay}
104
+
105
+ Note that the repository *must* be accessible without any password, and the
106
+ import will fail if a password was needed.
107
+ {.warning}
108
+
109
+ Tar archives
110
+ ------------
111
+
112
+ {coderay:: yaml}
113
+ version_control:
114
+ package_name:
115
+ type: archive
116
+ url: http://sourceforge.net/blablabla.tar.gz?option=value
117
+ filename: blabla.tar.gz # Optional: if the file name cannot be inferred from the URL
118
+ no_subdirectory: false # Optional. Set to true if there is not a leading directory in the archive
119
+ update_cached_file: false # Optional. Set to false to disable automatic updates
120
+ {coderay}
121
+
122
+ The importer expects that there is a leading subdirectory in the archive, under
123
+ which all files. If that is not the case, i.e. if all files are in the root of
124
+ the archive, do not forget to set the no\_subdirectory option.
125
+
126
+ Autoproj tries to guess what is the name of the downloaded file by extracting it
127
+ out of the URL. Sometimes, this does not work as the URL does not fit the
128
+ expected scheme -- in these cases you will get a tar error on update. To
129
+ override this autodetection behaviour, set the filename option to the actual
130
+ downloaded file name.
131
+
132
+ By default, autoproj will check if the downloaded file has been updated on the
133
+ server, and will download it again if it is the case. If you are downloading
134
+ release tarballs, this is unneeded as the archive should not be updated. In that
135
+ case, set the update\_cached\_file option to false to save the time needed to
136
+ check for the update (can be long on, for instance, sourceforge). The source
137
+ will of course be updated if you change the URL (i.e. to download a new release
138
+ of the same software).
139
+
140
+ Patching the source once it is checked out/updated
141
+ --------------------------------------------------
142
+
143
+ It is possible to apply patches after a given package (imported by any of the
144
+ importer types) has been checked out/updated. To do so, simply add a
145
+ <tt>patches:</tt> option in the importer configuration, that lists the patches
146
+ to apply:
147
+
148
+ {coderay:: yaml}
149
+ version_control:
150
+ package_name:
151
+ type: archive
152
+ url: http://sourceforge.net/blablabla
153
+ patches:
154
+ - $AUTOPROJ_SOURCE_DIR/blablabla-01.patch
155
+ - $AUTOPROJ_SOURCE_DIR/blablabla-02.patch
156
+ {coderay}
157
+
158
+ Note that in the example above, the patch is saved in the package set's folder
159
+ (the value of AUTOPROJ_SOURCE_DIR). This is a highly required practice.
160
+
161
+ Note that if the patch list changes (i.e. the *names* change), autoproj will
162
+ automatically unpatch and repatch as required. It is therefore highly required
163
+ to change the patch name if the patch changes.
164
+
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: Creating a package set
2
+ title: Overview
3
3
  sort_info: 100
4
4
  ---
5
5
  A package set is made of three things:
@@ -35,6 +35,8 @@ For the first step, you need to add one of the following lines:
35
35
  cmake_package "my/package" # for CMake package
36
36
  autotools_package "my/package" # for autoconf/automake packages
37
37
  orogen_package "my/package" # for orogen packages
38
+ import_package "my/package" # for custom packages
39
+ ruby_package "my/package" # for ruby libraries (optionally with C/C++ extensions)
38
40
  {coderay}
39
41
 
40
42
  The package name will be used to refer to this particular package later on --
@@ -76,7 +78,7 @@ version_control:
76
78
  - my/package: none
77
79
  {coderay}
78
80
 
79
- The remaining of this page is a more in-depth description of this process.
81
+ See [this page](importers.html) for details on the import mechanisms.
80
82
 
81
83
  Autobuild scripts
82
84
  -----------------
@@ -87,6 +89,9 @@ form, it looks like:
87
89
  {coderay:: ruby}
88
90
  cmake_package "orocos/rtt"
89
91
  autotools_package "drivers/imu"
92
+ orogen_package "modules/imu"
93
+ import_package "external/sisl"
94
+ ruby_package "orocos/orocos.rb"
90
95
  {coderay}
91
96
 
92
97
  The above snippet defines two packages. The first one uses CMake as a build
@@ -0,0 +1,29 @@
1
+ ---
2
+ title: The manifest.xml file
3
+ sort_info: 120
4
+ ---
5
+
6
+ The manifest.xml is an optional (but *very recommended*) file that lies in the
7
+ root of every source package. This file describes both what the package *is*
8
+ (i.e. short description, contact information), and dependency information (what
9
+ should be installed for that package to be built successfully).
10
+
11
+ The general form of the file is:
12
+
13
+ {coderay:: xml}
14
+ <package>
15
+ <description brief="one line of text">
16
+ long description goes here,
17
+ <em>XHTML is allowed</em>
18
+ </description>
19
+ <author>Alice/alice@somewhere.bar, Bob/bob@nowhere.foo</author>
20
+ <license>BSD</license>
21
+ <url>http://sites.google.com/site/rubyinmotion</url>
22
+ <logo>http://sites.google.com/site/rubyinmotion</logo>
23
+
24
+ <depend package="pkgname"/> <!-- add dependency on another autoproj-built package -->
25
+ <depend package="common"/>
26
+ <rosdep name="python" /> <!-- add dependency on a prepackaged operating system package -->
27
+ </package>
28
+ {coderay}
29
+