1 # SPDX-License-Identifier: GPL-2.0-only
3 # Copyright (C) 2023 ImmortalWrt.org
5 include $(TOPDIR
)/rules.mk
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
12 PKG_SOURCE_URL
:=https
://codeload.github.com
/alist-org
/alist
/tar.gz
/v
$(PKG_VERSION
)?
13 PKG_HASH
:=b7d1929d9aef511b263673dba8e5b787f695e1b4fa4555fe562f8060ee0bdea4
15 PKG_LICENSE
:=AGPL-3.0
-only
16 PKG_LICENSE_FILES
:=LICENSE
17 PKG_MAINTAINER
:=Tianling Shen
<cnsztl@immortalwrt.org
>
19 PKG_BUILD_DEPENDS
:=golang
/host
21 PKG_BUILD_FLAGS
:=no-mips16
23 GO_PKG
:=github.com
/alist-org
/alist
/v3
25 $(GO_PKG
)/internal
/conf.Version
=$(PKG_VERSION
) \
26 $(GO_PKG
)/internal
/conf.WebVersion
=$(PKG_VERSION
)
28 include $(INCLUDE_DIR
)/package.mk
29 include ..
/..
/lang
/golang
/golang-package.mk
34 TITLE
:=A file list program that supports multiple storage
35 URL
:=https
://alist.nn.ci
36 DEPENDS
:=$(GO_ARCH_DEPENDS
) +ca-bundle
+fuse-utils
39 define Package
/alist
/description
40 A file list program that supports multiple storage
, and supports
41 web browsing and webdav
, powered by gin and Solidjs.
44 define Package
/alist
/conffiles
50 WEB_FILE
:=$(PKG_NAME
)-web-
$(WEB_VERSION
).
tar.gz
51 define Download
/alist-web
52 URL
:=https
://github.com
/alist-org
/alist-web
/releases
/download
/$(WEB_VERSION
)/
55 HASH
:=ece9d3fd45f18eaa7376e5fc077ebeae8f67b7bcf6004a29ae58392bfc2a3d13
59 $(call Build
/Prepare
/Default
)
62 mkdir
-p
$(PKG_BUILD_DIR
)/public
; \
63 gzip
-dc
$(DL_DIR
)/$(WEB_FILE
) |
$(HOST_TAR
) -C
$(PKG_BUILD_DIR
)/public
$(TAR_OPTIONS
) ; \
67 ifneq ($(CONFIG_USE_MUSL
),)
68 TARGET_CFLAGS
+= -D_LARGEFILE64_SOURCE
71 define Package
/alist
/install
72 $(call GoPackage
/Package
/Install
/Bin
,$(PKG_INSTALL_DIR
))
74 $(INSTALL_DIR
) $(1)/usr
/bin
/
75 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/alist
$(1)/usr
/bin
/
77 $(INSTALL_DIR
) $(1)/etc
/config
78 $(INSTALL_CONF
) $(CURDIR
)/files
/alist.config
$(1)/etc
/config
/alist
79 $(INSTALL_DIR
) $(1)/etc
/init.d
80 $(INSTALL_BIN
) $(CURDIR
)/files
/alist.init
$(1)/etc
/init.d
/alist
83 $(eval
$(call Download
,alist-web
))
84 $(eval
$(call GoBinPackage
,alist
))
85 $(eval
$(call BuildPackage
,alist
))