termux-packages/packages/tergent/build.sh

34 lines
1.2 KiB
Bash
Raw Normal View History

2019-06-20 12:05:16 +02:00
TERMUX_PKG_HOMEPAGE=https://github.com/aeolwyr/tergent
2020-11-22 20:51:54 +01:00
TERMUX_PKG_DESCRIPTION="A cryptoki/PKCS#11 library for Termux that uses Android Keystore as its backend"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
2020-11-22 20:51:54 +01:00
TERMUX_PKG_VERSION=1.0.0
TERMUX_PKG_REVISION=3
2019-06-20 12:05:16 +02:00
TERMUX_PKG_SRCURL=https://github.com/aeolwyr/tergent/archive/${TERMUX_PKG_VERSION}.tar.gz
2020-11-22 20:51:54 +01:00
TERMUX_PKG_SHA256=0b59cf0ced3f693fb19396a986326963f3763e6bf65d3e56af0a03d206d69428
2019-06-20 12:05:16 +02:00
TERMUX_PKG_DEPENDS="termux-api"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_BLACKLISTED_ARCHES="arm, i686"
2020-11-22 20:51:54 +01:00
termux_step_make_install() {
termux_setup_rust
cargo build --jobs $TERMUX_MAKE_PROCESSES --target $CARGO_TARGET_NAME --release
install -Dm600 -t $TERMUX_PREFIX/lib target/${CARGO_TARGET_NAME}/release/libtergent.so
2020-11-22 20:51:54 +01:00
}
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
2020-11-22 21:39:28 +01:00
#!${TERMUX_PREFIX}/bin/bash
2020-11-22 20:51:54 +01:00
echo
echo "Tergent since v1.x has some breaking changes."
2020-11-22 20:51:54 +01:00
echo
echo "You will need new keys. See https://github.com/aeolwyr/tergent/blob/master/README.md#upgrading-from-01 for more details on how to upgrade."
2020-11-22 20:51:54 +01:00
echo
read -p "Are you sure you're ready to upgrade? [yN] " yn
case \$yn in
[Yy]* ) exit 0;;
* ) exit 1;;
esac
2020-11-22 20:51:54 +01:00
EOF
}