Add simple-http-server package
This commit is contained in:
parent
6a8cf1ab8d
commit
9b50b1b57b
2 changed files with 48 additions and 0 deletions
34
packages/network/simple-http-server/package.mk
Normal file
34
packages/network/simple-http-server/package.mk
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
# Copyright (C) 2023-present NeoTheFox (https://github.com/NeoTheFox)
|
||||
|
||||
PKG_NAME="simple-http-server"
|
||||
PKG_VERSION="0.6.7"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/TheWaWaR/simple-http-server"
|
||||
PKG_URL_ARM="https://github.com/TheWaWaR/simple-http-server/releases/download/v${PKG_VERSION}/armv7-unknown-linux-musleabihf-simple-http-server"
|
||||
PKG_URL_AARCH64="https://github.com/TheWaWaR/simple-http-server/releases/download/v${PKG_VERSION}/aarch64-unknown-linux-musl-simple-http-server"
|
||||
PKG_URL_X86_64="https://github.com/TheWaWaR/simple-http-server/releases/download/v${PKG_VERSION}/x86_64-unknown-linux-musl-simple-http-server"
|
||||
PKG_LONGDESC="Simple http server in Rust"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
unpack() {
|
||||
case $ARCH in
|
||||
x86_64)
|
||||
PKG_URL=$PKG_URL_X86_64
|
||||
;;
|
||||
arm)
|
||||
PKG_URL=$PKG_URL_ARM
|
||||
;;
|
||||
aarch64)
|
||||
PKG_URL=$PKG_URL_AARCH64
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -L $PKG_URL -o ${PKG_DIR}/simple-http-server
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
install -Dm755 ${PKG_DIR}/simple-http-server ${INSTALL}/usr/bin/
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=simple-http-server
|
||||
Wants=network-pre.target
|
||||
After=network-pre.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/simple-http-server -i -s -u /storage
|
||||
Restart=always
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue