Remove obsolete build_manpages target and markdown type
They're based on obsolete mkit.ini structure and is not used in any known
project. That said, at least build_manpages will be added in future,
most probably in form of plugin, once plugin structure is figured out.
(Stay tuned, but don't hold your breath!)
Decouple variable declarations so that each can have docstring.
In case of _relck() we also rename variable $relsrc to a more
context-specific term $oracle.
Merge sections lists, debstuff and rpmstuff to dist
They are all about "distribution", rpmstuff and debstuff have basically
just one item, and having "lists" section was ugly and meaningless in
the first place.
It's easier to do quoting at least mediocre-right in sed than in perl;
eg. with Perl, even e-mail address was causing quoting breakage due to
the at sign.
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 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.
Fix bad dist paths due to inadvertent ShellCheck "fix"
Actually ShellCheck was *right* that the variable expansion needed to
take care of spaces in paths, but the fix (g:b68913c in ffoo repo) was
totally wrong and only broke things.
Lessons learned:
* *Do* run ShellCheck et al., but still **DO CAREFULLY** consider
effects in the particular context.
* Too much coffee, repetitive work *and* distraction is a good way
to ask for trouble.