mozilla-devscripts is a collection of scripts based on Makefile inheritance usable by Mozilla packages in Ubuntu. - mozclient is an abstract tarball creator which provides a get-new-orig target - compare is an install checker The package contains rules for the following projects: - firefox-3.0 - lightning-sunbird (from MOZILLA_1_8_BRANCH) - nspr - nss - seamonkey-2.0 - thunderbird-3.0 - xulrunner-1.9 In addition there is a xpi.mk which provides standard rules/targets to package XPI extensions for mozilla/toolkit based applications. === mozclient === Creates a source tarball from CVS A clean-up script, called "remove.binonly.sh", is called to remove all binary-only files. It is applied to all projects before packing. Traces of the cleaning are preserved inside that resulting tarball in REMOVED+nobinonly.txt. If nothing has been removed, both the log and the "+nobinonly" signature are dropped. To use : - in debian/control: add mozilla-devscripts to Build-Depends - in debian/rules: add "include /usr/share/mozilla-devscripts/yourproject.mk" The following targets are then available to the caller of debian/rules: - get-orig-source Build a tarball according to parameters from project.mk and optionally using either DEBIAN_DATE or DEBIAN_TAG - mozclient-status List all the registered CVS tags from upstream server The caller could specify the following parameters: DEBIAN_DATE in the form YYYYMMDDtHHMM ex: DEBIAN_DATE=20070911t1711 or DEBIAN_TAG in the form CVS_TAG=debian_version ex: DEBIAN_TAG=FIREFOX_3_0b2_RC1=3.0~b2~rc1 Projects files are stored in /usr/share/mozilla-devscripts as .mk files. They contain the following parameters: - MOZCLIENT_TARGET (mandatory): a label, usually 'project-orig' - MOZCLIENT_APPNAME (mandatory): package name - MOZCLIENT_MODULES (optional): list of modules/directories for direct checkout - MOZCLIENT_PROJECT (mandatory): CVS project name. If $(NULL), then $(MOZCLIENT_MODULES) becomes mandatory - MOZCLIENT_BRANCH (optional): CVS branch name - MOZCLIENT_FILE (mandatory): source file containing the version - MOZCLIENT_GETVERSION (mandatory): how to transform the version - MOZCLIENT_URL (mandatory): an URL (usually on Bonsai) listing commits - MOZCLIENT_GETDATE (mandatory): get the last commit date for the project - MOZCLIENT_EMBEDDED (optional): create an embedded tarball (default: 0) - MOZCLIENT_WANTMOZDIR (optional): should the root dir be 'mozilla'? (default: 0 unless MOZCLIENT_EMBEDDED=1) Example with firefox-3.0: - in debian/control, add mozilla-devscripts to Build-Depends - in debian/rules, add: include /usr/share/mozilla-devscripts/firefox-3.0.mk That's it. You've gained get-orig-source. You can now call it: - debian/rules get-orig-source => firefox-3.0_3.0~b2~cvs20071120t1456+nobinonly.orig.tar.gz - debian/rules get-orig-source DEBIAN_DATE=20070914t1713 => firefox-3.0_3.0~a8~cvs20070914t1713+nobinonly.orig.tar.gz - debian/rules get-orig-source DEBIAN_TAG=FIREFOX_3_0b2_RC1=3.0~b2~rc1 => firefox-3.0_3.0~b2~rc1+nobinonly.orig.tar.gz === compare === Compares installed files and debs content The following target is available to the caller: compare: check the difference between: a/ what has been built (in dists/bin) and what has been installed (in debian/tmp) b/ what has been installed (in debian/tmp) and what has been put in the debs dists/bin is populated by the upstream build system debian/tmp is populated according to upstream installer/package-static files The following variable are available: COMPARE_FILTER_PRE_IN and COMPARE_FILTER_PRE_OUT (for a/) COMPARE_FILTER_IN and COMPARE_FILTER_OUT (for b/) By default, all are 'sed' commands that could be augmented (+=) or overwritten by the caller. To use (if not already done for another mozilla-devscripts script) - in debian/control: add mozilla-devscripts to Build-Depends - in debian/rules: add "include /usr/share/mozilla-devscripts/yourproject.mk" Example of COMPARE_FILTER_IN tweak: COMPARE_FILTER_IN += \ -e 's,^usr/lib/seamonkey-2.0/extensions/{f13b157f-b174-47e7-a34d-4815ddfdfeb8}.*,,' \ $(NULL) === xpi.mk === targets: --------- install-xpi - unpack and install the contents of the .xpi file to the package named by the MOZ_EXTENSION_PKG parameter clean-xpi - clean build cruft from install-xpi parameters: ------------ MOZ_EXTENSION_PKG - the binary package that will ship the extension MOZ_XPI_FILE - the XPI file to unpack and install to the binary package named by MOZ_EXTENSION_PKG. If not set, xpi.mk will use the first |*.xpi| file found in the packages top level directory MOZ_XPI_EMID - use the given EMID to name the links in the applications |extensions| directory. If not set, xpi.mk will try to guess the right EMID by introspecting the |install.rdf| shipped by the XPI MOZ_XPI_BUILD_COMMAND - use the given command _before_ running the normal |install-xpi| procedure. This parameter is useful for all those extension sources that have a command/make target to produce a XPI. MOZ_XPI_MOZILLA_DIRS - link the extension to the global |extensions| directory of the given MOZILLAs. The default value is |firefox| and |firefox-addons|, which will link the extension to the /usr/lib/firefox/extensions and /usr/lib/firefox-addons/extensions directories, respectively. cdbs: ------ If you are using cdbs (debhelper.mk) xpi.mk hooks in appropriately. cdbs targets to build the packages without any rule. The only thing required is to include the debhelper.mk from cdbs _before_ including xpi.mk. examples: ---------- A template is available in the branch available under the following URL: https://code.launchpad.net/~mozillateam/firefox-extensions/XPI.TEMPLATE