mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
syncthing: add stdiscosrv and strelaysrv
Signed-off-by: Van Waholtz <brvphoenix@gmail.com>
This commit is contained in:
@@ -20,7 +20,10 @@ PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/syncthing/syncthing/
|
||||
GO_PKG_BUILD_PKG:=github.com/syncthing/syncthing/cmd/syncthing/
|
||||
GO_PKG_BUILD_PKG:=\
|
||||
$(if $(CONFIG_PACKAGE_syncthing),github.com/syncthing/syncthing/cmd/syncthing/) \
|
||||
$(if $(CONFIG_PACKAGE_stdiscosrv),github.com/syncthing/syncthing/cmd/stdiscosrv/) \
|
||||
$(if $(CONFIG_PACKAGE_strelaysrv),github.com/syncthing/syncthing/cmd/strelaysrv/)
|
||||
GO_PKG_INSTALL_EXTRA:=^gui/
|
||||
|
||||
GO_PKG_LDFLAGS_X:=\
|
||||
@@ -34,32 +37,90 @@ GO_PKG_TAGS:=noupgrade
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../../lang/golang/golang-package.mk
|
||||
|
||||
define Package/syncthing
|
||||
TITLE:=Continuous file synchronization program
|
||||
define Package/syncthing/Default
|
||||
URL:=https://syncthing.net
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
endef
|
||||
|
||||
define Package/syncthing
|
||||
$(call Package/syncthing/Default)
|
||||
TITLE:=Continuous file synchronization program
|
||||
USERID:=syncthing=499:syncthing=499
|
||||
endef
|
||||
|
||||
define Package/stdiscosrv
|
||||
$(call Package/syncthing/Default)
|
||||
TITLE:=Discovery server for syncthing
|
||||
endef
|
||||
|
||||
define Package/strelaysrv
|
||||
$(call Package/syncthing/Default)
|
||||
TITLE:=Relay server for syncthing
|
||||
endef
|
||||
|
||||
define Package/syncthing/conffiles
|
||||
/etc/config/syncthing
|
||||
/etc/syncthing
|
||||
endef
|
||||
|
||||
define Package/syncthing/description
|
||||
Syncthing replaces proprietary sync and cloud services with something
|
||||
open, trustworthy and decentralized. Your data is your data alone and
|
||||
you deserve to choose where it is stored, if it is shared with some
|
||||
third party and how it's transmitted over the Internet.
|
||||
define Package/stdiscosrv/conffiles
|
||||
/etc/config/stdiscosrv
|
||||
/etc/stdiscosrv
|
||||
endef
|
||||
|
||||
define Package/strelaysrv/conffiles
|
||||
/etc/config/strelaysrv
|
||||
/etc/strelaysrv
|
||||
endef
|
||||
|
||||
define Package/syncthing/description
|
||||
Syncthing replaces proprietary sync and cloud services with something
|
||||
open, trustworthy and decentralized. Your data is your data alone and
|
||||
you deserve to choose where it is stored, if it is shared with some
|
||||
third party and how it's transmitted over the Internet.
|
||||
endef
|
||||
|
||||
define Package/stdiscosrv/description
|
||||
Relay server for syncthing
|
||||
endef
|
||||
|
||||
define Package/strelaysrv/description
|
||||
Relay server for syncthing
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
endef
|
||||
|
||||
define SyncthingInstall
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_CONF) $(CURDIR)/files/$(2).conf $(1)/etc/config/$(2)
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(CURDIR)/files/$(2).init $(1)/etc/init.d/$(2)
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin
|
||||
endef
|
||||
|
||||
|
||||
define Package/syncthing/install
|
||||
$(call GoPackage/Package/Install/Bin,$(1))
|
||||
$(call SyncthingInstall,$(1),syncthing)
|
||||
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/etc/sysctl.d/
|
||||
$(INSTALL_BIN) $(CURDIR)/files/syncthing-sysctl.conf $(1)/etc/sysctl.d/90-syncthing-inotify.conf
|
||||
endef
|
||||
|
||||
define Package/stdiscosrv/install
|
||||
$(call SyncthingInstall,$(1),stdiscosrv)
|
||||
endef
|
||||
|
||||
define Package/strelaysrv/install
|
||||
$(call SyncthingInstall,$(1),strelaysrv)
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,syncthing))
|
||||
$(eval $(call BuildPackage,syncthing))
|
||||
$(eval $(call BuildPackage,stdiscosrv))
|
||||
$(eval $(call BuildPackage,strelaysrv))
|
||||
|
||||
Reference in New Issue
Block a user