termux-packages/packages/rxfetch/build.sh
Pero Sar 41a4d4340b
Rename rxfetch-termux to rxfetch and use upstream (#9813)
* Package original rxfetch

Signed-off-by: PeroSar <perosar1111@gmail.com>

* Update CODEOWNERS

Signed-off-by: PeroSar <perosar1111@gmail.com>
2022-04-03 15:21:02 +08:00

30 lines
871 B
Bash

TERMUX_PKG_HOMEPAGE=https://github.com/Mangeshrex/rxfetch
TERMUX_PKG_DESCRIPTION="A custom system info fetching tool"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@PeroSar"
_COMMIT=53dc87c9e41bb83a5b466de14eca140c9205444c
TERMUX_PKG_VERSION=2022.04.03
TERMUX_PKG_SRCURL=https://github.com/mangeshrex/rxfetch.git
TERMUX_PKG_GIT_BRANCH=main
TERMUX_PKG_DEPENDS="bash"
TERMUX_PKG_CONFLICTS="rxfetch-termux"
TERMUX_PKG_REPLACES="rxfetch-termux"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_post_get_source() {
git fetch --unshallow
git checkout "$_COMMIT"
local ver=$(git log -1 --format=%cs | sed 's/-/./g')
if [ "$ver" != "$TERMUX_PKG_VERSION" ]; then
echo "Error: Expected version: $ver"
echo "Found version: $TERMUX_PKG_VERSION"
return 1
fi
}
termux_step_make_install() {
install -Dm700 -t "$TERMUX_PREFIX"/bin rxfetch
}