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.

79 lines
2.1 KiB

  1. # SPDX-Identifier-License: GPL-3.0-or-later
  2. #
  3. # Copyright (C) 2019 Elon Huang <elonhhuang@gmail.com>
  4. # Copyright (C) 2021 ImmortalWrt.org
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=rclone
  7. PKG_VERSION:=1.57.0
  8. PKG_RELEASE:=$(AUTORELEASE)
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://codeload.github.com/rclone/rclone/tar.gz/v$(PKG_VERSION)?
  11. PKG_HASH:=294f7a6b0874509997d3a9ffae7c74f0c45b687df0ac7d7742f284ad3814fe55
  12. PKG_LICENSE:=MIT
  13. PKG_LICENSE_FILE:=LICENSE
  14. PKG_MAINTAINER:=Elon Huang <elonhhuang@gmail.com> \
  15. Tianling Shen <cnsztl@immortalwrt.org>
  16. PKG_BUILD_DEPENDS:=golang/host
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_USE_MIPS16:=0
  19. GO_PKG:=github.com/rclone/rclone
  20. GO_PKG_EXCLUDES:=test
  21. GO_PKG_LDFLAGS_X:= \
  22. github.com/rclone/rclone/fs.Version=v$(PKG_VERSION) \
  23. main.Version=v$(PKG_VERSION) \
  24. main.BuildUser=openwrt \
  25. main.BuildHost=openwrt
  26. include $(INCLUDE_DIR)/package.mk
  27. include ../../lang/golang/golang-package.mk
  28. define Package/rclone/Default
  29. SECTION:=net
  30. CATEGORY:=Network
  31. SUBMENU:=File Transfer
  32. TITLE:=rsync for cloud storage
  33. URL:=https://rclone.org
  34. endef
  35. define Package/rclone
  36. $(call Package/rclone/Default)
  37. DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle +fuse-utils
  38. USERID:=rclone:rclone
  39. endef
  40. define Package/rclone-config
  41. TITLE+= (Config Scripts)
  42. DEPENDS:=+rclone
  43. endef
  44. define Package/rclone/description
  45. Rclone ("rsync for cloud storage") is a command line program to sync
  46. files and directories to and from different cloud storage providers.
  47. endef
  48. define Package/rclone-config/conffiles
  49. /etc/config/rclone
  50. endef
  51. define Package/rclone/install
  52. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  53. $(INSTALL_DIR) $(1)/usr/bin/
  54. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rclone $(1)/usr/bin/
  55. endef
  56. define Package/rclone-config/install
  57. $(INSTALL_DIR) $(1)/etc/config/
  58. $(INSTALL_CONF) $(CURDIR)/files/rclone.config $(1)/etc/config/rclone
  59. $(INSTALL_DIR) $(1)/etc/init.d/
  60. $(INSTALL_BIN) $(CURDIR)/files/rclone.init $(1)/etc/init.d/rclone
  61. endef
  62. $(eval $(call GoBinPackage,rclone))
  63. $(eval $(call BuildPackage,rclone))
  64. $(eval $(call BuildPackage,rclone-config))