2021-08-06 17:21:56 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://github.com/svenstaro/miniserve
|
2022-03-14 11:47:55 +01:00
|
|
|
TERMUX_PKG_DESCRIPTION="Tool to serve files and dirs over HTTP"
|
2021-08-06 17:21:56 +02:00
|
|
|
TERMUX_PKG_LICENSE="MIT"
|
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2022-04-02 20:14:20 +02:00
|
|
|
TERMUX_PKG_VERSION="0.19.4"
|
2021-08-06 17:21:56 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/svenstaro/miniserve/archive/v$TERMUX_PKG_VERSION.tar.gz
|
2022-04-02 20:14:20 +02:00
|
|
|
TERMUX_PKG_SHA256=d85a0e65f74a819709bfba8ab564d60162dba65430233e5582d00a6f81ff820d
|
2022-03-14 11:47:55 +01:00
|
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
2021-08-06 17:21:56 +02:00
|
|
|
TERMUX_PKG_DEPENDS=libbz2
|
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
|
|
|
|
termux_step_pre_configure() {
|
|
|
|
rm -f Makefile
|
|
|
|
}
|
2021-08-06 18:38:18 +02:00
|
|
|
|
|
|
|
termux_step_create_debscripts() {
|
|
|
|
cat <<- EOF > ./postinst
|
|
|
|
#!$TERMUX_PREFIX/bin/sh
|
|
|
|
|
2021-08-06 19:31:27 +02:00
|
|
|
# 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
|
|
|
|
|
2021-08-06 18:38:18 +02:00
|
|
|
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
|
|
|
|
|
2021-08-06 19:31:27 +02:00
|
|
|
# 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
|
2021-08-06 18:38:18 +02:00
|
|
|
EOF
|
|
|
|
}
|