The version numbers should be considered as examples.

Latest upstream release
-----------------------

- browse to http://libre.adacore.com/download/
- select "Free Software or Academic Development"
- click on "Build your download package"
- select any platform and "GNAT GPL 2014"
- select ASIS GPL 2014
- click on the asis-gpl-2014-src.tar.gz hyperlink (not the toggle button)

You may also find the same contents in a branch of the version control
system as desribed below.

Repackaging of the upstream tarball
-----------------------------------

Debian cannot redistribute the upstream tarball because the generated
documentation is licensed under the GNU Free Documentation License
with invariant sections and front-cover texts. The command line below
solves this issue, uses a better compression scheme and gives the
archive a name compatible with Debian standards.

Inside a (probably older) Debian source tree:
# mk-origtargz ../asis-gpl-2014-src.tar.gz --repack --compression=xz
or anywhere:
# mk-origtargz asis-gpl-2014-src.tar.gz --repack --compression xz \
  --package asis --version 2014 \
  --exclude-file "documentation" \
  --exclude-file="tools/gnatcheck/gnatcheck_rm.texi"
For a list of excluded files, see debian/copyright.

Use of the version control system
---------------------------------

You may either create an empty Monotone database
# mtn -d $db db init
or use an existing one.

All work on this package is tracked in the
www.ada-france.org monotone repository.
# upstream_branch=com.adacore.asis tracks the contents of AdaCore tarballs.
# debian_branch=org.debian.asis tracks the Debian packaging.
Note: com.adacore.asis.debian used to track the contents of the orig
DFSG tarball, but can be ignored since version 2014.

Download the branches from the server to your database.  The first
time you contact this server, monotone will show its key. You should
check that it matches f8a11727e8983cf9083c08c6a2acaa27e439dd39.
# server=www.ada-france.org
# mtn -d $db pull mtn://$server?$upstream_branch
# mtn -d $db pull mtn://$server?$debian_branch

Recreate asis-gpl-2014-src.tar.gz from a tag.
# mtn -d $db checkout -r t:asis-2014 asis-gpl-2014-src
# tar caf asis-gpl-2014-src.tar.gz asis-gpl-2014-src --exclude=_MTN
# rm -fr asis-gpl-2014-src
You may then repackage as described above.

Inspect the unpatched source tree.
# tar xf asis_2014.orig.tar.xz
# cd asis-gpl-2014-src
# mtn -d $db checkout -r h:$debian_branch .

Build the package
# debuild

Beware that:
- mtn status does not list all changes. Try "mtn list missing", "mtn
  list unknown", "mtn list ignored" and "mtn status" to get the
  equivalent of "git status".
- Monotone will detect changes outside debian/ caused by patches.
  Always "quilt pop -a" when preparing a commit.

 -- Nicolas Boulenguez <nicolas@debian.org>, Sat,  4 Oct 2014 16:51:09 +0200
