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.

80 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.58.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:=b3f953a282964d6d73a7278ccb2bb836d9aca855e9dc5fb6f4bc986b0e5656fa
  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. $(call Package/rclone/Default)
  42. TITLE+= (Config Scripts)
  43. DEPENDS:=+rclone
  44. endef
  45. define Package/rclone/description
  46. Rclone ("rsync for cloud storage") is a command line program to sync
  47. files and directories to and from different cloud storage providers.
  48. endef
  49. define Package/rclone-config/conffiles
  50. /etc/config/rclone
  51. endef
  52. define Package/rclone/install
  53. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  54. $(INSTALL_DIR) $(1)/usr/bin/
  55. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rclone $(1)/usr/bin/
  56. endef
  57. define Package/rclone-config/install
  58. $(INSTALL_DIR) $(1)/etc/config/
  59. $(INSTALL_CONF) $(CURDIR)/files/rclone.config $(1)/etc/config/rclone
  60. $(INSTALL_DIR) $(1)/etc/init.d/
  61. $(INSTALL_BIN) $(CURDIR)/files/rclone.init $(1)/etc/init.d/rclone
  62. endef
  63. $(eval $(call GoBinPackage,rclone))
  64. $(eval $(call BuildPackage,rclone))
  65. $(eval $(call BuildPackage,rclone-config))