Provide last_hash value as __MKIT_PROJ_GIT_LASTHASH__ token
Note that similar to __MKIT_PROJ_VERSION__, this value cannot be
reliably determined when outside git (e.g. distributor's build dir),
therefore must be kept inside dist source package.
Unlike version, though, user (ie. app developer, ie. mkit.ini
maintainer) most probably does not want to edit it, therefore we're
normally keeping it out of sight.
The value itself is normally just the last git commit's hash (SHA1 these
days), suffixed with ".dirty" mark if there were uncommitted changes
during build. (Just the same as we do with semver())
If we're outside git and the hash could not be determined, that either
means the source package was mangled with or was built with older
version of mkit. In either case, the value provided will be 'UNKNOWN'.
Some parts got a bit confusing over time, also there was repetition.
In this commit:
* the release fact gathering routines have been moved to separate
module,
* some less useful routines have been removed,
* some internal interfaces have been changed to allow for more
readable code.
Fix up the path joining logic:
* For obvious reasons, we panic if group's root is empty.
* DESTDIR can be empty, that's normal for installs such as when MKit
installs its own dogfood.
* Root (which sometimes starts with PREFIX) may or may not start with
slash; relative root such as that is also OK for installs like MKit
or TFKit.
* Furthermore, DESTDIR may or may not end with slash; we have to address
that and avoid joining the names.
Overview of changes:
* Added sanity checks for debstuff target
* Added new tokens: __MKIT_PROJ_PKGNAME__ and __MKIT_SELF_VERSION__
* Minor code and meta-data cleanups
Overview of changes:
* Added debstuff target to help Debian maintainers
* `make clean` removes directories as well
* Rewrote route with sane(r) approach ro targets
Simplify maintenance by moving list of valid_targets to a separate
function. Both router and usage message are now consumers thereof.
This also changes format of the usage message.
Overview of changes:
* Move all project meta-data to mkit.ini (obsolete config.mk)
* Add tagline to common peoject meta-data
* Use more qualified tokens for replacement
* Improve mini-changelog
Fix lasttag expression to get "latest tag *so far*"
Turns out that the old version has always shown the last tag available
instead of last tag available *so far*, i.e. up to the current HEAD.
This made it impossible to determine version correctly when an older
version was checked out, i.e. installing or packaging an older version
would result in broken versioning.