termux-packages/packages/gping/build.sh

39 lines
1.0 KiB
Bash
Raw Normal View History

2020-11-23 10:20:25 +01:00
TERMUX_PKG_HOMEPAGE=https://github.com/orf/gping
TERMUX_PKG_DESCRIPTION="Ping, but with a graph"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Krishna kanhaiya @kcubeterm"
TERMUX_PKG_VERSION=1.3.1
2021-07-24 18:58:50 +02:00
TERMUX_PKG_SRCURL=https://github.com/orf/gping/archive/refs/tags/gping-v$TERMUX_PKG_VERSION.zip
TERMUX_PKG_SHA256=c676dd070f1760e79bfccbeb56053ad3df7d0699bc554f044db1158dc33b2c8b
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+\.\d+\.\d+"
2022-02-28 02:14:20 +01:00
TERMUX_PKG_BUILD_DEPENDS="zlib"
2020-11-23 10:20:25 +01:00
TERMUX_PKG_BUILD_IN_SRC=true
2021-07-24 18:58:50 +02:00
termux_step_pre_configure() {
termux_setup_rust
2022-02-28 02:14:20 +01:00
mv $TERMUX_PREFIX/lib/libz.so.1{,.tmp}
mv $TERMUX_PREFIX/lib/libz.so{,.tmp}
2021-07-24 18:58:50 +02:00
}
termux_step_make() {
cd gping
cargo build --jobs $TERMUX_MAKE_PROCESSES --target $CARGO_TARGET_NAME --release
cd ..
}
termux_step_make_install() {
install -Dm755 -t $TERMUX_PREFIX/bin target/${CARGO_TARGET_NAME}/release/gping
}
2022-02-28 02:14:20 +01:00
termux_step_post_make_install() {
mv $TERMUX_PREFIX/lib/libz.so.1{.tmp,}
mv $TERMUX_PREFIX/lib/libz.so{.tmp,}
}
termux_step_post_massage() {
rm -f lib/libz.so.1
rm -f lib/libz.so
}