The versions given here should be taken as examples.

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

The official releases may be downloaded from the AdaCore site.
- 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 "AWS GPL 3.2.0"
- click on the aws-gpl-3.2.0-src.tar.gz hyperlink (not the toggle button)

Another option is to clone the upstream version control system.
# git clone https://scm.forge.open-do.org/git/aws/aws.git
or if you want the templates_parser submodule:
# git clone --recursive https://forge.open-do.org/anonscm/git/aws/aws.git
In both cases:
# git checkout gpl-2014

Be warned that AdaCore has applied many changes to the gpl-2014 head:
+ precompiled Python bytecode: *.pyc
+ precompiled documentation: docs/*.pdf docs/build docs/aws docs/templates_parser
+ information about the used revision: CHANGES
+ configuration for unofficial documentation: docs/source/confvars.py
- GIT version control system auxiliary files: .git*
- GCC Runtime Exception full copy: COPYING.RUNTIME
- a directory used only for development: workspace
Also, most headers allowing the GCC runtime exception or the GNAT
exception for generic units are replaced with empty lines and the
version in src/core/aws.ads is changed from 3.2.0w (w for wavefront)
to 3.2.0.

If you are curious, the script used to collect these data is available
as debian/check_upstream_git. It cannot be executed as is and you
should edit it to set the directories.

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

Debian cannot redistribute the upstream tarball because the generated
documentation contains minified Javascript. 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 ../aws-gpl-3.2.0-src.tar.gz --repack --compression=xz
or anywhere:
# mk-origtargz aws-gpl-3.2.0-src.tar.gz --repack --compression xz \
  --package libaws --version 3.2.0 \
  --exclude-file "foo" --exclude-file="bar"
For a list of excluded files, see debian/copyright

This archive may also be reproduced from the version control system as
described below.

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.libaws tracks repackaged tarballs.
# debian_branch=org.debian.libaws tracks the Debian packaging
Note: com.adacore.aws.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 the repackaged archive from a tag.
# mtn -d $db checkout -r t:aws-3.2.0 aws-gpl-3.2.0-src
# tar caf libaws_3.2.0.orig.tar.xz aws-gpl-3.2.0-src --exclude=_MTN
# rm -fr aws-gpl-3.2.0-src

Inspect the unpatched source tree.
# tar xf libaws_3.2.0.orig.tar.xz
# cd aws-gpl-3.2.0-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>, Sun, 14 Sep 2014 14:33:27 +0200
