![]() | ![]() | Building Debian Packages with darcs-buildpackage | ![]() |
---|
Getting started with darcs-buildpackage is pretty simple. This chapter shows you how.
darcs-buildpackage assumes that you have two "canonical" repositories for every Debian package. These repositories correspond to the upstream and the Debian versions of the package's source. The upstream repository tracks unmodified upstream versions. The Debian repository pulls in upstream patches, and also has the Debian-specific patches for your package. (Debian-native packages have no upstream version and thus no upstream repository.)
Normally, you would not work directly in the canonical repository storage area. Rather, you would use darcs get or dbp-get to make a copy of the sources, and darcs push to push changes back to your storage area when done.
The canonical repository need not be on your local machine. It could be any repository area that Darcs has access to.
The upstream repository tracks changes to the upstream program. You can use dbp-importorig or dbp-importdsc to import upstream sources from tarballs, or you can use Darcs to track a Darcs-based upstream with darcs get and darcs pull.
Each upstream version should be tagged with a tag nammed UPSTREAM_packagename_version. Note that the Debian revision doesn't appear in this tag. An example would be UPSTREAM_mypackage_1.0.5. If you use dbp-importorig or dbp-importdsc, this tag will be created for you automatically. If you manage your upstream repository manually, you should create the tag yourself using darcs tag
The Debian repository tracks the Debian-specific package. The Debian package is represented as the upstream source plus a set of Debian patches. Upstream patches are normally pulled into the Debian repository before beginning on the Debian package.
Each Debian version carries a tag similar to the upstream version, but the Debian version tags begin with DEBIAN_ and contain a full Debian revision. An example is DEBIAN_mypackage_1.0.5-3.
The first thing you must do is create your darcs-buildpackage configuration file. It is called .darcs-buildpackage and stored in your home directory. The main purpose of the configuration file is to specify the location and naming of your repositories.
There are two items required in the configuration file: upstreamrepo and debianrepo. The special token %(package)s represents the name of a specific package. Thus, a sample file could look like this:
upstreamrepo = /home/jgoerzen/debdarcs/%(package)s.upstream debianrepo = /home/jgoerzen/debdarcs/%(package)s
More sophisticated configurations are possible. (FIXME: write about them)
<<< Introduction | Importing Packages >>> |