packages/utils/syncthing/Makefile
Marc Benoit 33eda8575b syncthing: configuration cleanup & hardening
Run the service under an unprivileged
user account

The following parameters are now configurable
  niceness
  max concurrency (defaults to number of CPUs)
  user

Added flags "-no-browser"
Disabled in-place upgrades (disabled in the
build already)

Redirected stderr/stdout to syslog

Added support for "reload_config"

Increased "term_timeout" to 15s to give it
plenty of time to shut down gracefully

Properly handled non-existing directories

Removed a softlink that assumes a specific naming
convention in syncthing

Added a comment that using external storage is a
recommend configration

Signed-off-by: Marc Benoit <marcb62185@gmail.com>
[increased package release]
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit a9443eb0eb)
Tested-by: Marc Benoit <marcb62185@gmail.com>
2020-03-25 08:28:24 -10:00

68 lines
1.9 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=syncthing
PKG_VERSION:=1.4.0
PKG_RELEASE:=2
PKG_SOURCE:=syncthing-source-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/v$(PKG_VERSION)
PKG_HASH:=0c45955445752dac43d56bc321fae2140b5b05ad6d41a574ed37813607493edd
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME)
PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org>
PKG_LICENSE:=MPL-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:syncthing:syncthing
PKG_BUILD_DEPENDS:=golang/host
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_INSTALL_EXTRA:=^gui/
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
define Package/syncthing
TITLE:=Continuous file synchronization program
URL:=https://syncthing.net
DEPENDS:=$(GO_ARCH_DEPENDS)
SECTION:=utils
CATEGORY:=Utilities
USERID:=syncthing:syncthing
endef
GO_PKG_LDFLAGS_X:=\
github.com/syncthing/syncthing/lib/build.Version=v$(PKG_VERSION) \
github.com/syncthing/syncthing/lib/build.Stamp=$(SOURCE_DATE_EPOCH) \
github.com/syncthing/syncthing/lib/build.User=openwrt \
github.com/syncthing/syncthing/lib/build.Host=openwrt \
github.com/syncthing/syncthing/lib/build.Program=syncthing
define Build/Compile
$(call GoPackage/Build/Compile,-tags noupgrade)
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.
endef
define Package/syncthing/install
$(call GoPackage/Package/Install/Bin,$(1))
$(CP) ./files/* $(1)/
endef
$(eval $(call GoBinPackage,syncthing))
$(eval $(call BuildPackage,syncthing))