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.

66 lines
1.7 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=syncthing
  3. PKG_VERSION:=1.3.4
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=syncthing-source-v$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/v$(PKG_VERSION)
  7. PKG_HASH:=e40227f67b4317419900353be3f49f381ed36e41044df5d168b850f6b183ae08
  8. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME)
  9. PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org>
  10. PKG_LICENSE:=MPL-2.0
  11. PKG_LICENSE_FILES:=LICENSE
  12. PKG_CPE_ID:=cpe:/a:syncthing:syncthing
  13. PKG_BUILD_DEPENDS:=golang/host
  14. PKG_BUILD_PARALLEL:=1
  15. PKG_USE_MIPS16:=0
  16. GO_PKG:=github.com/syncthing/syncthing/
  17. GO_PKG_BUILD_PKG:=github.com/syncthing/syncthing/cmd/syncthing/
  18. GO_PKG_INSTALL_EXTRA:=^gui/
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../../lang/golang/golang-package.mk
  21. define Package/syncthing
  22. TITLE:=Continuous file synchronization program
  23. URL:=https://syncthing.net
  24. DEPENDS:=$(GO_ARCH_DEPENDS)
  25. SECTION:=utils
  26. CATEGORY:=Utilities
  27. endef
  28. GO_PKG_LDFLAGS_X:=\
  29. main.Version=v$(PKG_VERSION) \
  30. main.BuildUser=openwrt \
  31. main.BuildHost=openwrt \
  32. main.BuildStamp=$(SOURCE_DATE_EPOCH)
  33. define Build/Compile
  34. $(call GoPackage/Build/Compile,-tags noupgrade)
  35. endef
  36. define Package/syncthing/conffiles
  37. /etc/config/syncthing
  38. /etc/syncthing
  39. endef
  40. define Package/syncthing/description
  41. Syncthing replaces proprietary sync and cloud services with something
  42. open, trustworthy and decentralized. Your data is your data alone and
  43. you deserve to choose where it is stored, if it is shared with some
  44. third party and how it's transmitted over the Internet.
  45. endef
  46. define Package/syncthing/install
  47. $(call GoPackage/Package/Install/Bin,$(1))
  48. $(CP) ./files/* $(1)/
  49. endef
  50. $(eval $(call GoBinPackage,syncthing))
  51. $(eval $(call BuildPackage,syncthing))