mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 02:55:13 +08:00
🔥 Sync 2026-09-05 21:18:46
This commit is contained in:
1 parent
e88d0b9fed
commit
b05ff8a1b6
45 files changed
+506
-272
No files matched your search
+49
-40
@@ -1,47 +1,46 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2017-2024
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=filebrowser
|
||||
PKG_VERSION:=1.5.6-stable
|
||||
PKG_RELEASE=1
|
||||
PKG_VERSION:=2.63.23
|
||||
PKG_RELEASE:=21
|
||||
|
||||
ifeq ($(ARCH),aarch64)
|
||||
PKG_ARCH:=arm64
|
||||
PKG_HASH:=skip
|
||||
else ifeq ($(ARCH),arm)
|
||||
PKG_ARCH:=armv7
|
||||
PKG_HASH:=skip
|
||||
else ifeq ($(ARCH),x86_64)
|
||||
PKG_ARCH:=amd64
|
||||
PKG_HASH:=skip
|
||||
endif
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/filebrowser/filebrowser/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=skip
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host node/host node-pnpm/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/filebrowser/filebrowser/v2
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG)/version.CommitSHA=$(PKG_VERSION) \
|
||||
$(GO_PKG)/version.Version=v$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/filebrowser
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=@(arm||aarch64||x86_64)
|
||||
TITLE:=FileBrowser Quantum
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Web File Browser
|
||||
URL:=https://github.com/filebrowser/filebrowser
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/filebrowser/description
|
||||
The best free self-hosted web-based file manager.
|
||||
endef
|
||||
|
||||
PKG_SOURCE:=linux-$(PKG_ARCH)-filebrowser
|
||||
PKG_SOURCE_URL:=https://github.com/gtsteffaniak/filebrowser/releases/download/v$(PKG_VERSION)
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
filebrowser provides a file managing interface within a specified directory
|
||||
and it can be used to upload, delete, preview, rename and edit your files.
|
||||
It allows the creation of multiple users and each user can have its own directory.
|
||||
It can be used as a standalone app or as a middleware.
|
||||
endef
|
||||
|
||||
define Package/filebrowser/conffiles
|
||||
@@ -49,15 +48,25 @@ define Package/filebrowser/conffiles
|
||||
/etc/config/filebrowser
|
||||
endef
|
||||
|
||||
define Package/filebrowser/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(CURDIR)/files/filebrowser.init $(1)/etc/init.d/filebrowser
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(CURDIR)/files/filebrowser.config $(1)/etc/config/filebrowser
|
||||
$(INSTALL_DIR) $(1)/etc/filebrowser
|
||||
$(INSTALL_CONF) $(CURDIR)/files/config.yaml $(1)/etc/filebrowser/config.yaml
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(DL_DIR)/linux-$(PKG_ARCH)-filebrowser $(1)/usr/bin/filebrowser
|
||||
define Build/Compile
|
||||
( \
|
||||
export PNPM_HOME="$(PKG_BUILD_DIR)/frontend" ; \
|
||||
pushd "$(PKG_BUILD_DIR)/frontend" ; \
|
||||
pnpm install --frozen-lockfile ; \
|
||||
pnpm run build ; \
|
||||
popd ; \
|
||||
$(call GoPackage/Build/Compile) ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Package/filebrowser/install
|
||||
$(call GoPackage/Package/Install/Bin,$(1))
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(CURDIR)/files/filebrowser.config $(1)/etc/config/filebrowser
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(CURDIR)/files/filebrowser.init $(1)/etc/init.d/filebrowser
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,filebrowser))
|
||||
$(eval $(call BuildPackage,filebrowser))
|
||||
Reference in new issue
Block a user