The version numbers should be considered as examples.

Debian upstream version
-----------------------

Previous commercial release was 6.0.0.
Next commercial release should be 6.0.1.
All builds preparing 6.0.1 are numbered 6.0.1w (w stands for wavefront).
The "GPL 2014" release is based on one of the 6.0.1w builds.

GTKAda-3 is not packaged in Debian, so the current package relies on
the last 5.3.0w svn snapshot before the switch from GTKAda-2 to
GTKAda-3. It is versioned 5.3.

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 "GNAT Ada GPL 2014" then "Sources"
- click on the gps-6.0.1-src.tgz-src.tgz hyperlink (not the toggle button)

Structure of the version control system
---------------------------------------

All work  on GNAT  GPS source is  maintained via the  Monotone version
control system, and  browsable at http://www.ada-france.org:8081.  The
"mtn"  command  used  below  is  available in  the  "monotone"  Debian
package.
You may either create an empty Monotone database
# mtn -d $db db init
or use an existing one.

You may  download the current  upstream source from Adacore  in branch

# upstream_branch=com.adacore.gps

This  branch  is a  mirror  of  upstream's  Subversion repository  and
contains  the pristine  upstream  sources.  AdaCore  publish only  the
trunk; their release branches are private.

As such, the  Adacore source does not conform  to Debian Free Software
Guidelines.  A version following the DFSG is maintained in
parallel in branch

# dfsg_branch=com.adacore.gps.debian

This  is the branch  that the  Debian maintainers  use to  produce the
.orig.tar.gz.  The changes between upstream and this branch are:

* Removal of unnecessary .cvsignore and similar files.

* Removal of execute permission on all text files

* Plucking   some  bug   fixes  from   the  trunk,   as   detailed  in
  debian/changelog,  in an attempt  to reconstruct  upstream's private
  release branch.

* Clarify the GPL license, as some docs or source headers carry the
  license granted by AdaCore when selling the code. This license does
  not apply for th GPL releases.

* Remove embedded code copies of external libraries like
  templates-parser.

A script used to apply some of these changes to 5.3 can be found in
merge_upstream_into_dfsg. It can probably only be useful as a draft
when packaging next upstream release.

Similarly to  the upstream sources,  the Debian packaging  scripts and
patches  (like this  very  file) are  also  in monotone,  in a  branch
separate  from  the upstream  sources.

# debian_branch=org.debian.gnat-gps

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

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?$dfsg_branch
# mtn -d $db pull mtn://$server?$debian_branch

Recreate the orig archive from the head of $dfsg branch.
# mtn -d $db checkout -r h:$dfsg_branch gnat-gps-5.3.orig
# tar caf gnat-gps_5.3.orig.tar.xz gnat-gps-5.3.orig --exclude=_MTN
# rm -fr gnat-gps-5.3.orig

Create a workspace with the head of debian branch.
# tar xf gnat-gps_5.3.orig.tar.xz
# cd gnat-gps-5.3
# 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,  9 Nov 2014 23:40:56 +0100
