Upstream prepares a couple of deliverables for each release, for
example https://github.com/jabberd2/jabberd2/releases has the
following files for 2.3.3:

  jabberd-2.3.3.tar.gz
  jabberd-2.3.3.tar.xz
  jabberd-2.3.3.zip ("Source code zip")
  jabberd-2.3.3.tar.gz ("Source code tar.gz")

The first two files contains the non-free jquery.js file.  The latter
two files does not.  Unfortunately, the tar.gz filenames are called
the same, but the content differs.

For Debian packaging, we use the final tarball as the source, thus
avoiding the need to repackage the upstream source.

For historical reasons however, we still use the git branch
'upstream+dfsg' for tracking the upstream source code.  See gbp.conf.

---

We describe here one way to work with the package sources.

Initialize cowbuilder:

git-pbuilder create

Optionally update cowbuilder:

git-pbuilder update

Clone the repository:

git clone git://anonscm.debian.org/pkg-xmpp/jabberd2.git

Build the package:

gbp buildpackage --git-pbuilder --git-pbuilder-options=--twice

If all goes well, you should have newly built packages in ../.

Update the package to a new upstream release (don't forget debian/changelog):

gbp import-orig /path/to/new-release.tar.gz
