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
:=211704904788808ef2818994fb36e33c3e33ed1b52267f7adbf1411fa5ee2d2f
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
22 GO_PKG
:=github.com
/syncthing
/syncthing
/
24 $(if
$(CONFIG_PACKAGE_syncthing
),github.com
/syncthing
/syncthing
/cmd
/syncthing
/) \
25 $(if
$(CONFIG_PACKAGE_stdiscosrv
),github.com
/syncthing
/syncthing
/cmd
/stdiscosrv
/) \
26 $(if
$(CONFIG_PACKAGE_strelaysrv
),github.com
/syncthing
/syncthing
/cmd
/strelaysrv
/)
27 GO_PKG_INSTALL_EXTRA
:=^gui
/
30 github.com
/syncthing
/syncthing
/lib
/build.Version
=v
$(PKG_VERSION
) \
31 github.com
/syncthing
/syncthing
/lib
/build.Stamp
=$(SOURCE_DATE_EPOCH
) \
32 github.com
/syncthing
/syncthing
/lib
/build.User
=openwrt \
33 github.com
/syncthing
/syncthing
/lib
/build.Host
=openwrt \
34 github.com
/syncthing
/syncthing
/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
94 $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
97 define SyncthingInstall
98 $(INSTALL_DIR) $(1)/etc/config/
99 $(INSTALL_CONF) $(CURDIR)/files/$(2).conf $(1)/etc/config/$(2)
101 $(INSTALL_DIR) $(1)/etc/init.d/
102 $(INSTALL_BIN) $(CURDIR)/files/$(2).init $(1)/etc/init.d/$(2)
104 $(INSTALL_DIR) $(1)/usr/bin/
105 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin
109 define Package/syncthing/install
110 $(call SyncthingInstall,$(1),syncthing)
112 $(INSTALL_DIR) $(1)/etc/sysctl.d/
113 $(INSTALL_BIN) $(CURDIR)/files/syncthing-sysctl.conf $(1)/etc/sysctl.d/90-syncthing-inotify.conf
116 define Package/stdiscosrv/install
117 $(call SyncthingInstall,$(1),stdiscosrv)
120 define Package/strelaysrv/install
121 $(call SyncthingInstall,$(1),strelaysrv)
124 $(eval $(call BuildPackage,syncthing))
125 $(eval $(call BuildPackage,stdiscosrv))
126 $(eval $(call BuildPackage,strelaysrv))