The emdebian patch files of Emdebian packages are stored in Emdebian
SVN, along with the build logs created by successful builds with
emdebian-tools. To automate the version control of these
patch files, emdebian-tools contains the optional
emsource script that prepares an SVN working copy in a
preset directory beneath the emdebian working directory (in turn set by
debconf). The Debian source package is unpacked beneath that directory,
allowing SVN to keep the patch files under version control. If the developer
has Emdebian SVN commit access, a successful build log and the emdebian patch
files that were used to create the build can be committed to Emdebian SVN to
assist other developers or to provide a platform for building the next Debian
release of the package.
emsource is an optional component of
emdebian-tools intended to support Emdebian
SVN. When building packages that are not destined for the Emdebian
repository, there is no need to use emsource, instead the
usual Debian methods of apt-get source or
dget are likely to be more useful.
em_make needs to be run in the directory created by
unpacking the source with apt or dpkg
before the emdebian package can be built. emsource will
run em_make for you.
emdebuild can then be used to build the package.
If the build is successful, emdebuild
--svn can be used to commit modified patches and a build log
to Emdebian SVN.
Example 4.1. Example session with emsource
emsource<package>
downloads
a debian source package, unpacks it and applies or generates the emdebian patch
files. This is directly equivalent to apt-get source in
mainstream debian and then applying some patches. emsource
tells you where the package has been unpacked - in an SVN tree beneath your
emdebian working directory. (target denotes that these packages are intended
for installation directly onto the target embedded device.)
$ emsource -v foo Using foo 0.1.23.4-0.1 Working directory: '/path/to/working/dir' Checking for existing emdebian patches Checking out working copies of existing emdebian patches Checked out revision 1234. Checking for existing build tree in foo-0.1.23.4. Emdebianised source tree for 'foo' exists at '/path/to/working/dir/target/trunk/f/foo/trunk/foo-0.1.23.4' Change to this directory before running 'emdebuild'
Now you can cd into the package directory and run
emdebuild to cross-build the package. As with any
automated packaging process, take a moment to read through amended
debian/rules before attempting to build. You will need to
install any build dependencies as needed with apt-get or
aptitude. emdebuild creates a .build log for you. e.g. for
a package foo:
$ cd /path/to/working/dir/target/trunk/f/foo/trunk/foo-0.1.23.4 $ emdebuild -v
Packages, .changes, .dsc,
.diff.gz, patch files and the .build
log are created in the directory above:
$ ls /path/to/working/dir/target/trunk/f/foo/trunk/