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

  jabberd-2.5.0.tar.gz
  jabberd-2.5.0.tar.gz.asc
  jabberd-2.5.0.tar.xz
  jabberd-2.5.0.tar.xz.asc
  Source code (zip)
  Source code (tar.gz) 

The first four files contains the non-free jquery.js file.  The latter
two files does not.  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
