|
41
by Fabien Tassin
* Add the 'compare' script |
1 |
mozilla-devscripts is a collection of scripts based on Makefile inheritance |
2 |
usable by Mozilla packages in Ubuntu. |
|
3 |
||
|
86
by Fabien Tassin
* Update README before release |
4 |
- mozclient is an abstract tarball creator which provides a get-new-orig |
5 |
target
|
|
6 |
- compare is an install checker looking for missing files |
|
7 |
- minefield-packager creates debs from Firefox (official) nightly built |
|
8 |
tarballs
|
|
9 |
- xpi provides hooks to help package extensions in an elegant way |
|
10 |
- lp-locale-export is an helper for translations in launchpad for mozilla |
|
11 |
products and extensions |
|
12 |
||
13 |
============================================================================
|
|
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
14 |
|
15 |
The package contains rules for the following projects: |
|
16 |
- firefox-3.0 |
|
|
106
by Fabien Tassin
* [mozclient] add projects xulrunner-1.9.1 and firefox-3.1 using Mercurial |
17 |
- firefox-3.1 |
18 |
- firefox-4.0 |
|
|
142
by Fabien Tassin
* [mozclient] add project for Fennec using hg |
19 |
- fennec |
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
20 |
- lightning-sunbird (from MOZILLA_1_8_BRANCH) |
21 |
- nspr |
|
22 |
- nss |
|
23 |
- seamonkey-2.0 |
|
|
86
by Fabien Tassin
* Update README before release |
24 |
- thunderbird (2.0, from MOZILLA_1_8_BRANCH) |
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
25 |
- thunderbird-3.0 |
|
86
by Fabien Tassin
* Update README before release |
26 |
- xulrunner (1.8, from MOZILLA_1_8_BRANCH) |
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
27 |
- xulrunner-1.9 |
|
106
by Fabien Tassin
* [mozclient] add projects xulrunner-1.9.1 and firefox-3.1 using Mercurial |
28 |
- xulrunner-1.9.1 |
29 |
- xulrunner-2.0 |
|
|
184
by Fabien Tassin
* Fix a typo |
30 |
- midbrowser |
|
120
by Fabien Tassin
* [mozclient] add a project from Prism using svn |
31 |
- prism |
|
127
by Fabien Tassin
* [mozclient] add project for Flock using svn |
32 |
- flock |
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
33 |
|
|
59.1.1
by Alexander Sack
* document xpi.mk in README |
34 |
In addition there is a xpi.mk which provides standard rules/targets to package |
35 |
XPI extensions for mozilla/toolkit based applications. |
|
36 |
||
|
41
by Fabien Tassin
* Add the 'compare' script |
37 |
=== mozclient === |
38 |
||
|
100
by Fabien Tassin
* Rephrase doc to use VCS instead of CVS |
39 |
Creates a source tarball from a VCS |
|
41
by Fabien Tassin
* Add the 'compare' script |
40 |
|
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
41 |
A clean-up script, called "remove.binonly.sh", is called to remove all |
42 |
binary-only files. It is applied to all projects before packing. |
|
|
128
by Fabien Tassin
* [mozclient] run an optional package specific clean-up script. It should be called |
43 |
Optionally, $(project)-remove.binonly.sh is also applied. |
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
44 |
Traces of the cleaning are preserved inside that resulting tarball |
45 |
in REMOVED+nobinonly.txt. If nothing has been removed, both the log and |
|
46 |
the "+nobinonly" signature are dropped. |
|
47 |
||
48 |
To use : |
|
49 |
||
|
27
by Fabien Tassin
* Rename package from mozclient to mozilla-devscripts |
50 |
- in debian/control: add mozilla-devscripts to Build-Depends |
51 |
- in debian/rules: add "include /usr/share/mozilla-devscripts/yourproject.mk" |
|
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
52 |
|
|
175
by Fabien Tassin
* [ mozclient ] add support for external project files helping adoption |
53 |
Note: it is also possible to keep all project files outside of mozilla-devscripts. |
54 |
To do so, mozclient needs two variables: |
|
55 |
- MOZCLIENT_PROJECTNAME: the name of the conf file as described below, without the |
|
56 |
".conf" extension |
|
57 |
- MOZCLIENT_PROJECTDIR: a directory containing the project specific files to be used |
|
58 |
by mozclient. It is not a recommended to use the debian directory directly because |
|
59 |
there will be a confusion between debian/patches and $(MOZCLIENT_PROJECTDIR)/patches |
|
60 |
||
61 |
ex:
|
|
62 |
in debian/rules: |
|
63 |
MOZCLIENT_PROJECTNAME = myproject |
|
64 |
MOZCLIENT_PROJECTDIR = debian/mozclient |
|
65 |
include /usr/share/mozilla-devscripts/mozclient.mk |
|
66 |
in debian/mozclient: |
|
67 |
- a mandatory file called myproject.conf |
|
68 |
- an optional patches directory |
|
69 |
- an optional myproject-remove.binonly.sh file |
|
70 |
||
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
71 |
The following targets are then available to the caller of debian/rules: |
72 |
- get-orig-source |
|
73 |
Build a tarball according to parameters from project.mk |
|
|
110
by Fabien Tassin
* [mozclient] Full refactoring of mozclient. It is now written in object-oriented Perl. |
74 |
and optionally using either DEBIAN_DATE or DEBIAN_TAG, and optionally |
75 |
DEBIAN_BRANCH
|
|
|
95
by Fabien Tassin
* [mozclient] change the mozclient-status target name to list-tags easier to remember. |
76 |
- list-tags |
|
100
by Fabien Tassin
* Rephrase doc to use VCS instead of CVS |
77 |
List all the registered VCS tags from upstream server |
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
78 |
|
79 |
The caller could specify the following parameters: |
|
80 |
DEBIAN_DATE in the form YYYYMMDDtHHMM |
|
81 |
ex: DEBIAN_DATE=20070911t1711 |
|
82 |
or
|
|
83 |
DEBIAN_TAG in the form CVS_TAG=debian_version |
|
84 |
ex: DEBIAN_TAG=FIREFOX_3_0b2_RC1=3.0~b2~rc1 |
|
85 |
||
|
99
by Fabien Tassin
* [mozclient] add a variable called DEBIAN_KEEP_VCS to preserve the VCS files such as |
86 |
Optionally:
|
87 |
||
88 |
DEBIAN_KEEP_VCS to preserve the VCS files (*/CVS, .hg, ...) |
|
89 |
ex: DEBIAN_KEEP_VCS=1 |
|
90 |
||
|
194
by Fabien Tassin
* [mozclient] add support for local branches instead of the configured remote ones. |
91 |
LOCAL_BRANCH=/foo/bar/baz to point to a local branch instead of |
92 |
the configured remote one. It is faster if you have to publish |
|
93 |
tarballs quite often from this branch, such as daily snapshots. |
|
94 |
The local branch will be updated first. |
|
95 |
Note that the getdate are still remote so you need network connectivity. |
|
96 |
||
|
110
by Fabien Tassin
* [mozclient] Full refactoring of mozclient. It is now written in object-oriented Perl. |
97 |
Projects files are stored in /usr/share/mozilla-devscripts/mozclient |
98 |
as .conf files. They contain the following parameters: |
|
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
99 |
|
100 |
- MOZCLIENT_APPNAME (mandatory): package name |
|
|
48
by Fabien Tassin
* Add support in mozclient for DEBIAN_TAG for nss and nspr by not using |
101 |
- MOZCLIENT_MODULES (optional): list of modules/directories for direct checkout |
|
110
by Fabien Tassin
* [mozclient] Full refactoring of mozclient. It is now written in object-oriented Perl. |
102 |
- MOZCLIENT_VCS (mandatory): VCS (hg, git, cvs, svn..) |
|
118
by Fabien Tassin
* [mozclient] Change MOZCLIENT_CVS_LOC and MOZCLIENT_HG_LOC into a common |
103 |
- MOZCLIENT_VCS_LOC (mandatory): VCS location (cvs loc, url, ...) |
|
110
by Fabien Tassin
* [mozclient] Full refactoring of mozclient. It is now written in object-oriented Perl. |
104 |
- MOZCLIENT_PROJECT (optional): VCS project name. If $(NULL), then |
|
48
by Fabien Tassin
* Add support in mozclient for DEBIAN_TAG for nss and nspr by not using |
105 |
$(MOZCLIENT_MODULES) becomes mandatory |
|
96
by Fabien Tassin
* [mozclient] add support for Mercurial (hg) and add a firefox-4.0 project |
106 |
- MOZCLIENT_BRANCH (optional): VCS branch name |
107 |
- MOZCLIENT_POSTCOCMD (optional): a shell command that is executed after checkout |
|
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
108 |
- MOZCLIENT_FILE (mandatory): source file containing the version |
109 |
- MOZCLIENT_GETVERSION (mandatory): how to transform the version |
|
110 |
- MOZCLIENT_GETDATE (mandatory): get the last commit date for the project |
|
|
121
by Fabien Tassin
* [prism] add optional MOZCLIENT_SEPARATOR to specify what we want between |
111 |
- MOZCLIENT_SEPARATOR (optional): separator between version and date (default: ~) |
|
139
by Fabien Tassin
* Change MOZCLIENT_TAREXCLUDE to list *additional* dirs/files to |
112 |
- MOZCLIENT_TAREXCLUDE (optional): list of additional dirs/files to exclude |
113 |
from packaging |
|
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
114 |
- MOZCLIENT_EMBEDDED (optional): create an embedded tarball (default: 0) |
115 |
- MOZCLIENT_WANTMOZDIR (optional): should the root dir be 'mozilla'? |
|
116 |
(default: 0 unless MOZCLIENT_EMBEDDED=1) |
|
|
96
by Fabien Tassin
* [mozclient] add support for Mercurial (hg) and add a firefox-4.0 project |
117 |
- MOZCLIENT_WANTPATCH (optional): should we use the patch system? (default: 0) |
|
110
by Fabien Tassin
* [mozclient] Full refactoring of mozclient. It is now written in object-oriented Perl. |
118 |
- MOZCLIENT_DYNTAG (optional): paired with MOZCLIENT_DYNTAG_FILES, a shell |
119 |
command that is executed to get a VCS tag |
|
120 |
- MOZCLIENT_DYNTAG_FILES (optional): list of files to get before calling |
|
121 |
MOZCLIENT_DYNTAG
|
|
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
122 |
|
123 |
Example with firefox-3.0: |
|
124 |
||
|
27
by Fabien Tassin
* Rename package from mozclient to mozilla-devscripts |
125 |
- in debian/control, add mozilla-devscripts to Build-Depends |
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
126 |
- in debian/rules, add: |
|
27
by Fabien Tassin
* Rename package from mozclient to mozilla-devscripts |
127 |
include /usr/share/mozilla-devscripts/firefox-3.0.mk |
|
24
by Fabien Tassin
* First release after a full rewrite + packaging |
128 |
|
129 |
That's it. You've gained get-orig-source. |
|
130 |
||
131 |
You can now call it: |
|
132 |
- debian/rules get-orig-source |
|
133 |
=> firefox-3.0_3.0~b2~cvs20071120t1456+nobinonly.orig.tar.gz |
|
134 |
||
135 |
- debian/rules get-orig-source DEBIAN_DATE=20070914t1713 |
|
136 |
=> firefox-3.0_3.0~a8~cvs20070914t1713+nobinonly.orig.tar.gz |
|
137 |
||
138 |
- debian/rules get-orig-source DEBIAN_TAG=FIREFOX_3_0b2_RC1=3.0~b2~rc1 |
|
139 |
=> firefox-3.0_3.0~b2~rc1+nobinonly.orig.tar.gz |
|
140 |
||
|
41
by Fabien Tassin
* Add the 'compare' script |
141 |
=== compare === |
142 |
||
143 |
Compares installed files and debs content |
|
144 |
||
145 |
The following target is available to the caller: |
|
|
59
by Fabien Tassin
* Update the compare module to also check dist/bin vs debian/tmp |
146 |
|
147 |
compare: check the difference between: |
|
148 |
a/ what has been built (in dists/bin) and what has been installed (in debian/tmp) |
|
149 |
b/ what has been installed (in debian/tmp) and what has been put in the debs |
|
150 |
dists/bin is populated by the upstream build system |
|
151 |
debian/tmp is populated according to upstream installer/package-static files |
|
|
41
by Fabien Tassin
* Add the 'compare' script |
152 |
|
153 |
The following variable are available: |
|
|
59
by Fabien Tassin
* Update the compare module to also check dist/bin vs debian/tmp |
154 |
COMPARE_FILTER_PRE_IN and COMPARE_FILTER_PRE_OUT (for a/) |
155 |
COMPARE_FILTER_IN and COMPARE_FILTER_OUT (for b/) |
|
156 |
By default, all are 'sed' commands that could be augmented (+=) or |
|
|
41
by Fabien Tassin
* Add the 'compare' script |
157 |
overwritten by the caller. |
158 |
||
159 |
To use (if not already done for another mozilla-devscripts script) |
|
160 |
||
161 |
- in debian/control: add mozilla-devscripts to Build-Depends |
|
162 |
- in debian/rules: add "include /usr/share/mozilla-devscripts/yourproject.mk" |
|
163 |
||
|
44
by Fabien Tassin
* Provide an example of how to tweak COMPARE_FILTER_IN |
164 |
Example of COMPARE_FILTER_IN tweak: |
165 |
||
166 |
COMPARE_FILTER_IN += \ |
|
167 |
-e 's,^usr/lib/seamonkey-2.0/extensions/{f13b157f-b174-47e7-a34d-4815ddfdfeb8}.*,,' \ |
|
168 |
$(NULL) |
|
|
59.1.1
by Alexander Sack
* document xpi.mk in README |
169 |
|
|
78
by Fabien Tassin
* [ minefield-packager ] |
170 |
=== minefield-packager === |
171 |
||
172 |
minefield-packager creates debs from Firefox nightly built tarballs available |
|
173 |
on mozilla web/ftp site. Those builds are often useful to check a regression |
|
174 |
and to determine if a bug is Ubuntu specific or if it is also affecting |
|
175 |
upstream builds. The deb produced are for testing purpose only, please don't |
|
176 |
report bugs in Launchpad about those. |
|
177 |
||
178 |
Example:
|
|
179 |
||
180 |
(from a writable directory) |
|
|
83
by Fabien Tassin
* [minefield-packager] add a 'list' command and add support for by-date snapshots |
181 |
$ make -f /usr/share/mozilla-devscripts/minefield-packager.mk |
182 |
$ sudo dpkg -i firefox-minefield_3.0~b5~build2008032304-1_i386.deb |
|
183 |
||
184 |
You can also ask for a particular snapshot by adding DEBIAN_DATE=id, |
|
185 |
where id is one of the date returned by the 'list' command: |
|
186 |
||
187 |
$ make -f /usr/share/mozilla-devscripts/minefield-packager.mk list |
|
188 |
Available snapshots are: |
|
189 |
2008-02-27-04 04-Mar-2008 19:31 |
|
190 |
2008-02-27-14 28-Feb-2008 07:30 |
|
191 |
2008-02-27-18 28-Feb-2008 04:53 |
|
192 |
2008-02-28-04 06-Mar-2008 04:56 |
|
193 |
...
|
|
194 |
2008-03-28-04 29-Mar-2008 05:03 |
|
195 |
2008-03-28-05 29-Mar-2008 06:57 |
|
196 |
2008-03-29-04 29-Mar-2008 06:50 |
|
197 |
latest 29-Mar-2008 06:50 |
|
198 |
$ make -f /usr/share/mozilla-devscripts/minefield-packager.mk DEBIAN_DATE=2008-03-28-04 |
|
199 |
$ sudo dpkg -i firefox-minefield_3.0~build2008032804-1_i386.deb |
|
|
78
by Fabien Tassin
* [ minefield-packager ] |
200 |
|
|
59.1.1
by Alexander Sack
* document xpi.mk in README |
201 |
=== xpi.mk === |
202 |
||
203 |
targets:
|
|
204 |
---------
|
|
205 |
install-xpi - unpack and install the contents of the .xpi file to the |
|
206 |
package named by the MOZ_EXTENSION_PKG parameter |
|
207 |
clean-xpi - clean build cruft from install-xpi |
|
208 |
||
209 |
parameters:
|
|
210 |
------------
|
|
211 |
MOZ_EXTENSION_PKG - the binary package that will ship the extension |
|
212 |
MOZ_XPI_FILE - the XPI file to unpack and install to the binary package |
|
213 |
named by MOZ_EXTENSION_PKG. If not set, xpi.mk will use |
|
214 |
the first |*.xpi| file found in the packages top level |
|
215 |
directory
|
|
216 |
MOZ_XPI_EMID - use the given EMID to name the links in the applications |
|
217 |
|extensions| directory. If not set, xpi.mk will try to |
|
218 |
guess the right EMID by introspecting the |install.rdf| |
|
219 |
shipped by the XPI |
|
220 |
MOZ_XPI_BUILD_COMMAND
|
|
221 |
- use the given command _before_ running the normal |
|
222 |
|install-xpi| procedure. This parameter is useful for all |
|
223 |
those extension sources that have a command/make target |
|
|
159
by Sasa Bodiroza
* Add default build command to src/xpi.mk. |
224 |
to produce a XPI. If a developer doesn't provide the |
225 |
command, the default one will be used. |
|
|
59.1.1
by Alexander Sack
* document xpi.mk in README |
226 |
MOZ_XPI_MOZILLA_DIRS
|
227 |
- link the extension to the global |extensions| directory |
|
228 |
of the given MOZILLAs. The default value is |firefox| and |
|
229 |
|firefox-addons|, which will link the extension to the |
|
230 |
/usr/lib/firefox/extensions and /usr/lib/firefox-addons/extensions |
|
231 |
directories, respectively. |
|
232 |
||
233 |
cdbs:
|
|
234 |
------
|
|
235 |
If you are using cdbs (debhelper.mk) xpi.mk hooks in appropriately. |
|
236 |
cdbs targets to build the packages without any rule. The only thing required |
|
237 |
is to include the debhelper.mk from cdbs _before_ including xpi.mk. |
|
238 |
||
239 |
||
240 |
examples:
|
|
241 |
----------
|
|
242 |
A template is available in the branch available under the following URL: |
|
243 |
https://code.launchpad.net/~mozillateam/firefox-extensions/XPI.TEMPLATE |
|
244 |
||
|
68
by Alexander Sack
* add README stub for lp-locale-export.mk |
245 |
|
246 |
=== lp-locale-export.mk === |
|
247 |
||
248 |
Include this helper if you want to translate your mozilla application or extension |
|
249 |
through launchpad. |
|
250 |
||
251 |
XXX: document here! |
|
252 |
||
|
154
by Sasa Bodiroza
Document src/med-xpi-{pack,unpack} in README |
253 |
|
|
280
by Benjamin Drung
* med-xpi-{pack,unpack}: |
254 |
=== xpi-unpack === |
|
154
by Sasa Bodiroza
Document src/med-xpi-{pack,unpack} in README |
255 |
|
256 |
This script unpacks XPI file to the provided output directory. After unpacking |
|
257 |
the XPI file, it will look for JAR files in the output directory. All JAR files |
|
258 |
will be unpacked to $JAR_FILE with "!" appended. For example, "test.jar" is |
|
259 |
unpacked to "test.jar!" directory. After unpacking, the script removes all JAR |
|
260 |
files. |
|
261 |
To run it, pass the name of the XPI file, and the name of the output directory: |
|
262 |
||
|
280
by Benjamin Drung
* med-xpi-{pack,unpack}: |
263 |
$ xpi-unpack ubufox.xpi output |
|
154
by Sasa Bodiroza
Document src/med-xpi-{pack,unpack} in README |
264 |
|
265 |
In case some of the parameters are missing, input XPI file doesn't exist, or |
|
266 |
output directory already exists, it will report an error and exit. |
|
267 |
||
268 |
||
|
280
by Benjamin Drung
* med-xpi-{pack,unpack}: |
269 |
=== xpi-pack === |
|
154
by Sasa Bodiroza
Document src/med-xpi-{pack,unpack} in README |
270 |
|
271 |
This script prepares a XPI file from the provided input directory. First, it |
|
272 |
will look for all unpacked JAR files in the input directory. Directories with |
|
|
280
by Benjamin Drung
* med-xpi-{pack,unpack}: |
273 |
the unpacked JAR files have the format explained in xpi-unpack section. The |
|
154
by Sasa Bodiroza
Document src/med-xpi-{pack,unpack} in README |
274 |
script will pack the contents of the directory to the JAR file, named like the |
275 |
JAR directory, with stripped "!" sign. For example, contents of "test.jar!" are |
|
276 |
packed to "test.jar" file. After that, it will remove all JAR directories. |
|
|
158
by Sasa Bodiroza
Improve documentation for med-xpi-pack |
277 |
Finally, it will pack the contents of the input directory to the XPI file, |
278 |
which is placed inside the provided input directory. This behaviour is because |
|
279 |
xpi.mk will look for XPI file inside top-level extension directory, which is |
|
|
160
by Sasa Bodiroza
Improve med-xpi-pack to not include debian/ and temp-*/ directories, and to unpack JAR files back after XPI file is produced. |
280 |
the input directory in that case. The script doesn't pack debian/ and temp-*/ |
|
164
by Sasa Bodiroza
* Fix src/med-xpi-pack to not check if XPI file already exists. It breaks the build |
281 |
directories to the XPI file. After XPI file is produced, it will unpack all JAR |
|
160
by Sasa Bodiroza
Improve med-xpi-pack to not include debian/ and temp-*/ directories, and to unpack JAR files back after XPI file is produced. |
282 |
files, in order to leave intact source. |
|
154
by Sasa Bodiroza
Document src/med-xpi-{pack,unpack} in README |
283 |
To run it, pass the name of the input directory, and the name of the XPI file: |
284 |
||
|
280
by Benjamin Drung
* med-xpi-{pack,unpack}: |
285 |
$ xpi-pack . ubufox.xpi |
|
154
by Sasa Bodiroza
Document src/med-xpi-{pack,unpack} in README |
286 |
|
|
164
by Sasa Bodiroza
* Fix src/med-xpi-pack to not check if XPI file already exists. It breaks the build |
287 |
In case some of the parameters are missing, or input directory doesn't exist, |
288 |
it will report an error and exit. |