new package: kphp-timelib

This commit is contained in:
Tee KOBAYASHI 2022-01-13 19:32:25 +09:00 committed by Leonid Pliushch
parent 637ea742fe
commit 4b14ed024d
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
TERMUX_PKG_HOMEPAGE=https://github.com/derickr/timelib
TERMUX_PKG_DESCRIPTION="timelib 2020.02 library fork for KPHP"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_LICENSE_FILE="LICENSE.rst"
TERMUX_PKG_MAINTAINER="@termux"
_COMMIT=59ee82faa8d9ed42b1b9b9339e0b989cc929cd4a
TERMUX_PKG_VERSION=2021.03.01
TERMUX_PKG_SRCURL=https://github.com/VKCOM/timelib.git
TERMUX_PKG_GIT_BRANCH=master
TERMUX_PKG_NO_STATICSPLIT=true
termux_step_post_get_source() {
git fetch --unshallow
git checkout $_COMMIT
local version="$(git log -1 --format=%cs | sed 's/-/./g')"
if [ "$version" != "$TERMUX_PKG_VERSION" ]; then
echo -n "ERROR: The specified version \"$TERMUX_PKG_VERSION\""
echo " is different from what is expected to be: \"$version\""
return 1
fi
}