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.

49 lines
1.5 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=restic-rest-server
  3. PKG_VERSION:=0.9.7
  4. PKG_RELEASE:=1
  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:=-s -w
  18. GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION)
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../../lang/golang/golang-package.mk
  21. define Package/restic-rest-server
  22. TITLE:=restic REST server
  23. URL:=http://github.com/restic/rest-server
  24. DEPENDS:=$(GO_ARCH_DEPENDS)
  25. SECTION:=net
  26. CATEGORY:=Network
  27. endef
  28. define Package/restic-rest-server/description
  29. Rest Server is a high performance HTTP server that implements restic's REST backend
  30. API. It provides secure and efficient way to backup data remotely, using restic
  31. backup client via the rest: URL.
  32. endef
  33. define Package/restic-rest-server/install
  34. $(INSTALL_DIR) $(1)/usr/bin
  35. $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/rest-server $(1)/usr/bin/restic-rest-server
  36. $(CP) ./files/* $(1)/
  37. endef
  38. $(eval $(call GoBinPackage,restic-rest-server))
  39. $(eval $(call BuildPackage,restic-rest-server))