luci.mk: more APK version compatibility changes
The initial commit did not take care of corner cases which could happen
if building under build conditions other than using Git.
There are three cases for the `findrev` function:
- git -> 24.079.58964~
7943616 (remove prefixed `git-`)
APK can't handle `git-` as prefix, it could be `0_git<integer>` but this
seems rather confusing.
- date -> 0.240326.34906 ( add leading 0)
Add a leading zero so the version is always lower compared to using
Git. This makes it easier to distinguish from a Git based version.
- unknown -> 0 (instead of `unknown`)
APK can't handle `unknown` so set it to a simple zero instead.
Signed-off-by: Paul Spooren <mail@aparcar.org>