Currently best supported are simple command line utilities without many
build dependencies. For the sake of this example we'll duplicate the existing
cal
package, but additionally patch it to provide some
Maemo-specific behaviour.. It is assumed that the previous tutorial has been
folowed and that mud is installed and the alias set.
packages/mycal.xml
:
<package>
<fetch type="debian">
<name>cal</name>
</fetch>
</package>
build/mycal/.build
:
mud get mycal
.build
is a symlink to whatever source directory is unpacked, in this case cal-3.5
.cd build/mycal/.build
source/cal.c
, line 574 from:
fputs("\t\t\t\t ", stdout);
…to…
fputs("\t\t\t\tMaemo in ", stdout);
mud compile mycal
…
fakeroot dpkg -i ../../../upload/ccal*.deb
…
ccal 2007
svn status
Note that the source/cal.c
line is prefixed with "M" for
modified. This is what we want, note also the auto-changes to
debian/control
. We don't want to store this as it can be easily
regenerated by mud-builder
so revert that file and then save the
patch into your local copy of mud-builder:
svn diff debian/control
svn revert debian/control
mud diff mycal
Files marked with a "?" are unknown to Subversion and are usually ignorable side effects of the build. If you add a new file, use svn add <path>
to include it in the diff.
packages/mycal.xml
and
packages/patch/mycal.patch
to the mud-builder-users
mailing list.mud clean mycal
Because our changes were saved in
packages/patch/mycal.patch
, the next time that mud get
mycal
is run the patch will be re-applied after the source is
unpacked.
There is reference documentation available on the XML-file package format.