When building from git, it can be useful to know which version
a user has at commit level resolution. When building in a git
repository, use git describe to generate a version string. If
HEAD matches a tag, use that. Examples:
$ ./svtplay-dl --version
0.20.2015.10.08-3-gbd75a67
$ git tag -a 0.20.2015.10.18
$ make
...
$ ./svtplay-dl --version
0.20.2015.10.18
make release is also adjusted, so that it overrides the version
value when building, so that official releases still only has the
tag.
pod2man will insert a date in the footer of the manpage. By default,
it takes this value from the mtime of the input file. But this makes
it non-deterministic in that another build may produce other results.
By setting it to always be the date of the latest release we make it
deterministic.
To build a new release, including tagging and commiting the release changes
(regenerate svtplay-dl, and update Makefile with LATEST_RELEASE), just do make
release. Obviously, the intended user of this target is the upstream author(s).
As part of the make release target, svtplay-dl will be unit tested and the
manpage will be checked to make sure all options are documented. All of this
happens in a local clone of your local repo. This is to make sure that no files
are left uncommited.
Finally, the changes necessary will be applied to your repo and a tag will be
set. All you have to do at this point is to verify that everything looks ok, and
then push master and the new tag to github.
This change makes it easier to add new packages; it's only necessary
to update the sub makefile (lib/Makefile) and add new packaes to the
PACKAGES variable.