Why dfsg version ?
==================

Moar tarball comes from upstream with convenience copies of upstream
projects in 3rdparty directory. Moar offers the possibility to compile
without using some of these copies (Run 'perl Configure.pl --help' to
see the related options).

We are trying to use Debian versions when:
- the software is available in Debian
- the software was not heavily modified upstream

Here the status on the convenience copies:

- libatomic_ops libtommath libuv:
  source files are excluded. Moar is built with Debian packages

- dynasm
  Upstream hosts repos which are taken from an unknown location.
  They may be modified but I've found no way to check. 
  AFAIK, Debian does not provide these softwares.

- dyncall
  moar is now built with libffi. dyncall is now excluded

- uthash.h:
  file is provided by uthash-dev 1.9.9.1+git20151125-1
  moar's uthash is a year old and different from Debian version.

- tinymt
  Not provided by Debian

- msinttypes sha1
  To be investigated

Lintian overrides
=================

The RPATH check in lintian needs to be overridden, since the path
/usr/share/perl6/site/lib will be used by Rakudo packages that need to
install NativeCall libraries.

Source managed with git-buildpackage
====================================

We will use similar tools as described in the Perl Git Guide[1].

Today, I only use git-buildpackage, but I hope the Perl6 team will
adapt and provide similar tools to those used by the Perl5 group.

Upstream sources are kept (in plain, uncompressed form) in the
“upstream” branch. The data needed to regenerate original source
tarballs from the upstream branch are kept with the help of the
pristine-tar(1) tool in the “pristine-tar” branch. Upstream sources
are merged with Debian-specific changes in the “master” branch, which
is the usual place to work in.

The debian/changelog is managed with “gbp dch”.

Minimal “everything is working fine” steps to provide a new version
-------------------------------------------------------------------

* Clone the repository.  If it is already cloned, make sure to have the
  “upstream/master” and “pristine-tar” branches

    $ gbp clone --all --pristine-tar \
          git+ssh://developername@scm.alioth.debian.org//git/pkg-rakudo/pkg-moarvm.git \
	  moarvm

* Integrate the new upstream tarball

    (master) $ gbp import-orig --uscan
    (master) $ git merge --no-edit upstream/<VERSION>

* Update the debian/patches to make them apply without fuzzy

    (master) $ gbp pq rebase
    (master) $ gbp pq export
    (master) $ git add debian/patches/
    (master) $ git commit -m "Update patches"

* Optional: Prepare the debian/changelog for UNRELEASED package.
  This can be done from time to time before the release and should be
  ignored by gbp-dch

    (master) $ gbp dch -a -S
    (master) $ git add debian/changelog
    (master) $ git commit -m "$(echo -e 'Update debian/changelog\n\nGbp-Dch: Ignore')"

* Build the package

    (master) $ gbp buildpackage

* Make sure lintian is happy

    (master) $ lintian -i -I -E --pedantic ../moarvm*.changes

* Release the debian/changelog

    (master) $ gbp dch -a -R
    (master) $ git add debian/changelog
    (master) $ git commit -m "Release debian/changelog"

* Create the Debian release tag

    (master) $ gbp buildpackage --git-tag-only

* Push git object

    (master) $ git push origin master upstream/master pristin-tar upstream/<VERSION> debian/<VERSION>-1

Footnotes:
[1]  https://pkg-perl.alioth.debian.org/git.html

 -- Dominique Dumont <dod@debian.org>, Mon, 10 Oct 2016 09:06:08 +0200
