You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.6 KiB

  1. # SPDX-License-Identifier: GPL-3.0-only
  2. #
  3. # Copyright (C) 2021 ImmortalWrt.org
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=cloudreve
  6. PKG_VERSION:=3.5.3
  7. PKG_RELEASE:=$(AUTORELEASE)
  8. PKG_SOURCE_PROTO:=git
  9. PKG_SOURCE_URL:=https://github.com/cloudreve/Cloudreve.git
  10. PKG_SOURCE_VERSION:=$(PKG_VERSION)
  11. PKG_MIRROR_HASH:=c43ec528df19d239b06456e78aae3d9852da5cca372c157b62f1f74b03f5cc0d
  12. PKG_LICENSE:=GPL-3.0-only
  13. PKG_LICENSE_FILES:=LICENSE
  14. PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
  15. PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_USE_MIPS16:=0
  18. GO_PKG:=github.com/cloudreve/Cloudreve/v3
  19. GO_PKG_LDFLAGS_X:= \
  20. $(GO_PKG)/pkg/conf.BackendVersion=$(PKG_VERSION) \
  21. $(GO_PKG)/pkg/conf.LastCommit=$(PKG_VERSION)
  22. include $(INCLUDE_DIR)/package.mk
  23. include ../../lang/golang/golang-package.mk
  24. define Package/cloudreve
  25. SECTION:=net
  26. CATEGORY:=Network
  27. SUBMENU:=Cloud Manager
  28. TITLE:=A project helps you build your own cloud in minutes
  29. URL:=https://cloudreve.org
  30. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
  31. endef
  32. define Package/cloudreve/description
  33. Self-deployed file management and sharing system, supports multiple
  34. storage providers.
  35. endef
  36. define Build/Compile
  37. ( \
  38. pushd $(PKG_BUILD_DIR)/assets ; \
  39. yarn install ; \
  40. yarn run build ; \
  41. popd ; \
  42. $(call GoPackage/Build/Compile) ; \
  43. )
  44. endef
  45. define Package/cloudreve/install
  46. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  47. $(INSTALL_DIR) $(1)/usr/bin
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/Cloudreve $(1)/usr/bin/cloudreve
  49. endef
  50. $(eval $(call GoBinPackage,cloudreve))
  51. $(eval $(call BuildPackage,cloudreve))