crosswalk-project/crosswalk — pull request #1127 by rakuco (2013-11-14 12:46:08+00:00)
Title: [Packaging] Improve support for incremental Tizen builds.

This pull request has commits with long commit messages, and each commit also
has a lot of comments to explain what is going on.

Once this lands, the idea is that one can launch incremental Tizen builds by
doing the following:
```
cd /path/to/src/xwalk
gbs build -A i586 --define 'BUILDDIR_NAME /var/tmp/my-builddir'
```

No need for `generate-flat-tree.sh` and separate git trees anymore, by the way.

The first commit does the groundwork by introducing `gbp-flat-tree.sh`: it is
a standalone commit that simplifies the way one launches a new Tizen RPM build.
As the commit message says, we're now able to completely bypass the way
`git-buildpackage` generates source tarballs with `git archive` by inserting a
postexport hook that calls `gbp-flat-tree.sh`. It automatically creates the
right tarball and completely removes the need for a separate git tree for gbs.

The second commit builds upon the first one and adds support for the
`BUILDDIR_NAME` macro that one can pass to `gbs build`. Since `rpmbuild`
removes the RPM build area every time if one does not call `gbs build` with
`--incremental`, we can work around that by building somewhere else in the
Tizen chroot. The commit message contains a longer explanation of what is being
done.

The third commit updates the `README` in `packaging/` with new instructions for
generating Tizen packages. In the future, we should just remove the file
altogether and move the instructions to the wiki.