1 include $(TOPDIR
)/rules.mk
7 PKG_SOURCE
:=syncthing-source-v
$(PKG_VERSION
).
tar.gz
8 PKG_SOURCE_URL
:=https
://github.com
/syncthing
/syncthing
/releases
/download
/v
$(PKG_VERSION
)
9 PKG_HASH
:=3d0eca0e6f4eaaeba4879918b3f54f47d59fb5f4288a83af821d509271ada189
11 PKG_BUILD_DIR
=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)/$(PKG_NAME
)
13 PKG_MAINTAINER
:=Paul Spooren
<mail@aparcar.org
>
15 PKG_LICENSE_FILES
:=LICENSE
16 PKG_CPE_ID
:=cpe
:/a
:syncthing
:syncthing
18 PKG_BUILD_DEPENDS
:=golang
/host
20 PKG_BUILD_FLAGS
:=no-mips16
22 GO_PKG
:=github.com
/syncthing
/syncthing
24 $(if
$(CONFIG_PACKAGE_syncthing
),$(GO_PKG
)/cmd
/syncthing
/) \
25 $(if
$(CONFIG_PACKAGE_stdiscosrv
),$(GO_PKG
)/cmd
/stdiscosrv
/) \
26 $(if
$(CONFIG_PACKAGE_strelaysrv
),$(GO_PKG
)/cmd
/strelaysrv
/)
27 GO_PKG_INSTALL_EXTRA
:=^gui
/
30 $(GO_PKG
)/lib
/build.Version
=v
$(PKG_VERSION
) \
31 $(GO_PKG
)/lib
/build.Stamp
=$(SOURCE_DATE_EPOCH
) \
32 $(GO_PKG
)/lib
/build.User
=openwrt \
33 $(GO_PKG
)/lib
/build.Host
=openwrt \
34 $(GO_PKG
)/lib
/build.Tags
=noupgrade
35 GO_PKG_TAGS
:=noupgrade
37 include $(INCLUDE_DIR
)/package.mk
38 include ..
/..
/lang
/golang
/golang-package.mk
40 define Package
/syncthing
/Default
41 URL
:=https
://syncthing.net
42 DEPENDS
:=$(GO_ARCH_DEPENDS
)
47 define Package
/syncthing
48 $(call Package
/syncthing
/Default
)
49 TITLE
:=Continuous file synchronization program
50 USERID
:=syncthing
=499:syncthing
=499
53 define Package
/stdiscosrv
54 $(call Package
/syncthing
/Default
)
55 TITLE
:=Discovery server for syncthing
58 define Package
/strelaysrv
59 $(call Package
/syncthing
/Default
)
60 TITLE
:=Relay server for syncthing
63 define Package
/syncthing
/conffiles
68 define Package
/stdiscosrv
/conffiles
69 /etc
/config
/stdiscosrv
73 define Package
/strelaysrv
/conffiles
74 /etc
/config
/strelaysrv
78 define Package
/syncthing
/description
79 Syncthing replaces proprietary sync and cloud services with something
80 open
, trustworthy and decentralized. Your data is your data alone and
81 you deserve to choose where it is stored
, if it is shared with some
82 third party and how it
's transmitted over the Internet.
85 define Package/stdiscosrv/description
86 Relay server for syncthing
89 define Package/strelaysrv/description
90 Relay server for syncthing
93 define SyncthingInstall
94 $(INSTALL_DIR) $(1)/etc/$(2)
96 $(INSTALL_DIR) $(1)/etc/config/
97 $(INSTALL_CONF) $(CURDIR)/files/$(2).conf $(1)/etc/config/$(2)
99 $(INSTALL_DIR) $(1)/etc/init.d/
100 $(INSTALL_BIN) $(CURDIR)/files/$(2).init $(1)/etc/init.d/$(2)
102 $(INSTALL_DIR) $(1)/usr/bin/
103 $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/$(2) $(1)/usr/bin
107 define Package/syncthing/install
108 $(call SyncthingInstall,$(1),syncthing)
110 $(INSTALL_DIR) $(1)/etc/sysctl.d/
111 $(INSTALL_BIN) $(CURDIR)/files/syncthing-sysctl.conf $(1)/etc/sysctl.d/90-syncthing-inotify.conf
114 define Package/stdiscosrv/install
115 $(call SyncthingInstall,$(1),stdiscosrv)
118 define Package/strelaysrv/install
119 $(call SyncthingInstall,$(1),strelaysrv)
122 $(eval $(call BuildPackage,syncthing))
123 $(eval $(call BuildPackage,stdiscosrv))
124 $(eval $(call BuildPackage,strelaysrv))