mirror of
https://github.com/kenzok8/small-package
synced 2025-01-07 07:06:58 +08:00
49 lines
1.7 KiB
Makefile
49 lines
1.7 KiB
Makefile
# SPDX-License-Identifier: GPL-3.0
|
|
#
|
|
# Copyright (C) 2022-2024 muink <https://github.com/muink>
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
LUCI_NAME:=luci-app-tinyfilemanager
|
|
PKG_VERSION:=2.6
|
|
PKG_RELEASE:=20241213
|
|
|
|
LUCI_TITLE:=LuCI Tiny File Manager
|
|
LUCI_DEPENDS:=+php8 +php8-cgi +php8-fastcgi +php8-fpm +php8-mod-session +php8-mod-ctype +php8-mod-fileinfo +php8-mod-zip +php8-mod-iconv +php8-mod-mbstring +coreutils-stat +zoneinfo-asia +bash +curl +tar +inotifywait
|
|
|
|
LUCI_DESCRIPTION:=A Web based File Manager in PHP
|
|
|
|
PKG_MAINTAINER:=Anya Lin <hukk1996@gmail.com>
|
|
PKG_LICENSE:=GPL-3.0
|
|
|
|
PKG_UNPACK=$(CURDIR)/.prepare.sh $(PKG_NAME) $(CURDIR) $(PKG_BUILD_DIR)
|
|
|
|
define Package/$(LUCI_NAME)/conffiles
|
|
/etc/config/tinyfilemanager
|
|
endef
|
|
|
|
define Package/$(LUCI_NAME)/postinst
|
|
#!/bin/sh
|
|
mkdir -p "$${IPKG_INSTROOT}/www/tinyfilemanager" 2>/dev/null
|
|
[ ! -d "$${IPKG_INSTROOT}/www/tinyfilemanager/rootfs" ] && ln -s / "$${IPKG_INSTROOT}/www/tinyfilemanager/rootfs"
|
|
total_size_limit=5G #post_max_size = 8M
|
|
single_size_limit=2G #upload_max_filesize = 2M
|
|
otime_uploads_limit=200 #max_file_uploads = 20
|
|
sed -Ei "s|^(post_max_size) *=.*$$|\1 = $$total_size_limit|; \
|
|
s|^(upload_max_filesize) *=.*$$|\1 = $$single_size_limit|; \
|
|
s|^(max_file_uploads) *=.*$$|\1 = $$otime_uploads_limit|" \
|
|
"$${IPKG_INSTROOT}/etc/php.ini"
|
|
# unpack
|
|
tar -C "$${IPKG_INSTROOT}/www/tinyfilemanager" -xzf "$${IPKG_INSTROOT}/www/tinyfilemanager/index.tgz"
|
|
rm -f "$${IPKG_INSTROOT}/www/tinyfilemanager/index.tgz"
|
|
endef
|
|
|
|
define Package/$(LUCI_NAME)/prerm
|
|
#!/bin/sh
|
|
if [ -d /www/tinyfilemanager ]; then rm -rf /www/tinyfilemanager; fi
|
|
endef
|
|
|
|
include $(TOPDIR)/feeds/luci/luci.mk
|
|
|
|
# call BuildPackage - OpenWrt buildroot signature
|