Allow builds from 'git archive' generated tarballs
The current release can be build from git clone sources because running git rev-parse HEAD at build time works, but it fails to build from an archive tarball such as is generated by GitHub when you download the source link on a release and generated with git archive.
This fixes that by first checking an env var that a user can set by using export TAR_COMMIT_ID=$(git get-tar-commit-id <package>.tar.gz). It isn't a pancea and requires some intervention, but at least it makes it possible to build without a patch, etc.
@alerque please add a changelog entry matching other contributions
thanks for your contribution. note that i will change the env name to BUILD_GIT_COMMIT_ID. hope that is ok