termux-packages/packages/miniserve/build.sh
Oskar 75b43c820e
bump miniserve to 0.19.2 and enable autoupdate (#9396)
* bump miniserve to 0.19.2 and enable autoupdate

* update description
2022-03-14 19:47:55 +09:00

39 lines
1.3 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://github.com/svenstaro/miniserve
TERMUX_PKG_DESCRIPTION="Tool to serve files and dirs over HTTP"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.19.2
TERMUX_PKG_SRCURL=https://github.com/svenstaro/miniserve/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=353632758dd05fb3f6862fcaea86d9eee2cdf889e97181a880b354fe33e760da
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS=libbz2
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
rm -f Makefile
}
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
# Generating shell completions.
mkdir -p $TERMUX_PREFIX/share/bash-completion/completions
mkdir -p $TERMUX_PREFIX/share/zsh/site-functions
mkdir -p $TERMUX_PREFIX/share/fish/vendor_completions.d
miniserve --print-completions bash \
> "$TERMUX_PREFIX"/share/bash-completion/completions/miniserve
miniserve --print-completions zsh \
> "$TERMUX_PREFIX"/share/zsh/site-functions/_miniserve
miniserve --print-completions fish \
> "$TERMUX_PREFIX"/share/fish/vendor_completions.d/miniserve.fish
# Warn user on default behaviour of miniserve.
echo
echo "WARNING: miniserve follows symlinks in selected directory by default. Consider aliasing it with '--no-symlinks' for safety."
echo "See: https://github.com/svenstaro/miniserve/issues/498"
echo
EOF
}