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.

54 lines
1.6 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=restic-rest-server
  3. PKG_VERSION:=0.9.7
  4. PKG_RELEASE:=5
  5. PKG_BUILD_DIR:=$(BUILD_DIR)/rest-server-$(PKG_VERSION)
  6. PKG_SOURCE:=rest-server-$(PKG_VERSION).tar.gz
  7. PKG_SOURCE_URL:=https://codeload.github.com/restic/rest-server/tar.gz/v${PKG_VERSION}?
  8. PKG_HASH:=922811cfc49879f7086fe559d25ec1bb4169b2c4a5df3559b499e6292f435661
  9. PKG_LICENSE:=BSD-2-Clause
  10. PKG_LICENSE_FILES:=LICENSE
  11. PKG_MAINTAINER:=Markus Weippert <markus@gekmihesg.de>
  12. PKG_BUILD_DEPENDS:=golang/host
  13. PKG_BUILD_PARALLEL:=1
  14. PKG_USE_MIPS16:=0
  15. GO_PKG:=github.com/restic/rest-server/
  16. GO_PKG_BUILD_PKG:=github.com/restic/rest-server/cmd/rest-server/
  17. GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION)
  18. include $(INCLUDE_DIR)/package.mk
  19. include ../../lang/golang/golang-package.mk
  20. define Package/restic-rest-server
  21. TITLE:=restic REST server
  22. URL:=http://github.com/restic/rest-server
  23. DEPENDS:=$(GO_ARCH_DEPENDS)
  24. SECTION:=net
  25. CATEGORY:=Network
  26. endef
  27. define Package/restic-rest-server/conffiles
  28. /etc/config/restic-rest-server
  29. endef
  30. define Package/restic-rest-server/description
  31. Rest Server is a high performance HTTP server that implements restic's REST backend
  32. API. It provides secure and efficient way to backup data remotely, using restic
  33. backup client via the rest: URL.
  34. endef
  35. GO_PKG_BUILD_VARS += GO111MODULE=auto
  36. define Package/restic-rest-server/install
  37. $(INSTALL_DIR) $(1)/usr/bin
  38. $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/rest-server $(1)/usr/bin/restic-rest-server
  39. $(CP) ./files/* $(1)/
  40. endef
  41. $(eval $(call GoBinPackage,restic-rest-server))
  42. $(eval $(call BuildPackage,restic-rest-server))