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.

68 lines
1.9 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=syncthing
  3. PKG_VERSION:=1.4.0
  4. PKG_RELEASE:=2
  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:=0c45955445752dac43d56bc321fae2140b5b05ad6d41a574ed37813607493edd
  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. GO_PKG_LDFLAGS_X:=\
  20. github.com/syncthing/syncthing/lib/build.Version=v$(PKG_VERSION) \
  21. github.com/syncthing/syncthing/lib/build.Stamp=$(SOURCE_DATE_EPOCH) \
  22. github.com/syncthing/syncthing/lib/build.User=openwrt \
  23. github.com/syncthing/syncthing/lib/build.Host=openwrt \
  24. github.com/syncthing/syncthing/lib/build.Program=syncthing
  25. include $(INCLUDE_DIR)/package.mk
  26. include ../../lang/golang/golang-package.mk
  27. define Package/syncthing
  28. TITLE:=Continuous file synchronization program
  29. URL:=https://syncthing.net
  30. DEPENDS:=$(GO_ARCH_DEPENDS)
  31. SECTION:=utils
  32. CATEGORY:=Utilities
  33. USERID:=syncthing:syncthing
  34. endef
  35. define Build/Compile
  36. $(call GoPackage/Build/Compile,-tags noupgrade)
  37. endef
  38. define Package/syncthing/conffiles
  39. /etc/config/syncthing
  40. /etc/syncthing
  41. endef
  42. define Package/syncthing/description
  43. Syncthing replaces proprietary sync and cloud services with something
  44. open, trustworthy and decentralized. Your data is your data alone and
  45. you deserve to choose where it is stored, if it is shared with some
  46. third party and how it's transmitted over the Internet.
  47. endef
  48. define Package/syncthing/install
  49. $(call GoPackage/Package/Install/Bin,$(1))
  50. $(CP) ./files/* $(1)/
  51. endef
  52. $(eval $(call GoBinPackage,syncthing))
  53. $(eval $(call BuildPackage,syncthing))