2019-12-18 17:42:56 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=restic-rest-server
|
2022-07-03 10:01:18 +00:00
|
|
|
PKG_VERSION:=0.11.0
|
treewide: remove AUTORELEASE
Automatically compute and substitute current values for all
$(AUTORELEASE) instances as this feature is deprecated and shouldn't be
used.
The following temporary change was made to the core:
diff --git a/rules.mk b/rules.mk
index 57d7995d4fa8..f16367de87a8 100644
--- a/rules.mk
+++ b/rules.mk
@@ -429,7 +429,7 @@ endef
abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1))))
COMMITCOUNT = $(if $(DUMP),0,$(call commitcount))
-AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1))
+AUTORELEASE = $(if $(DUMP),0,$(shell sed -i "s/\$$(AUTORELEASE)/$(call commitcount,1)/" $(CURDIR)/Makefile))
all:
FORCE: ;
And this command used to fix affected packages:
for i in $(cd feeds/packages; git grep -l PKG_RELEASE:=.*AUTORELEASE | \
sed 's^.*/\([^/]*\)/Makefile^\1^';);
do
make package/$i/download
done
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2023-04-21 16:32:27 +00:00
|
|
|
PKG_RELEASE:=2
|
2019-12-18 17:42:56 +00:00
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/rest-server-$(PKG_VERSION)
|
|
|
|
PKG_SOURCE:=rest-server-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=https://codeload.github.com/restic/rest-server/tar.gz/v${PKG_VERSION}?
|
2022-07-03 10:01:18 +00:00
|
|
|
PKG_HASH:=cd9b35ad2224244207a967ebbc78d84f4298d725e95c1fa9341ed95a350ea68f
|
2019-12-18 17:42:56 +00:00
|
|
|
|
|
|
|
PKG_LICENSE:=BSD-2-Clause
|
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
2022-07-03 10:01:18 +00:00
|
|
|
PKG_MAINTAINER:=Tom Stöveken <tom@naaa.de>
|
2019-12-18 17:42:56 +00:00
|
|
|
|
|
|
|
PKG_BUILD_DEPENDS:=golang/host
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
2023-03-23 07:39:01 +00:00
|
|
|
PKG_BUILD_FLAGS:=no-mips16
|
2019-12-18 17:42:56 +00:00
|
|
|
|
|
|
|
GO_PKG:=github.com/restic/rest-server/
|
|
|
|
GO_PKG_BUILD_PKG:=github.com/restic/rest-server/cmd/rest-server/
|
|
|
|
GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION)
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
include ../../lang/golang/golang-package.mk
|
|
|
|
|
|
|
|
define Package/restic-rest-server
|
|
|
|
TITLE:=restic REST server
|
|
|
|
URL:=http://github.com/restic/rest-server
|
|
|
|
DEPENDS:=$(GO_ARCH_DEPENDS)
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
endef
|
|
|
|
|
2020-07-06 22:27:51 +00:00
|
|
|
define Package/restic-rest-server/conffiles
|
|
|
|
/etc/config/restic-rest-server
|
|
|
|
endef
|
|
|
|
|
2019-12-18 17:42:56 +00:00
|
|
|
define Package/restic-rest-server/description
|
|
|
|
Rest Server is a high performance HTTP server that implements restic's REST backend
|
|
|
|
API. It provides secure and efficient way to backup data remotely, using restic
|
|
|
|
backup client via the rest: URL.
|
|
|
|
endef
|
|
|
|
|
2021-02-24 18:37:12 +00:00
|
|
|
GO_PKG_BUILD_VARS += GO111MODULE=auto
|
|
|
|
|
2019-12-18 17:42:56 +00:00
|
|
|
define Package/restic-rest-server/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/rest-server $(1)/usr/bin/restic-rest-server
|
|
|
|
$(CP) ./files/* $(1)/
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call GoBinPackage,restic-rest-server))
|
|
|
|
$(eval $(call BuildPackage,restic-rest-server))
|