Ravenports generated: 06 Mar 2021 03:49
[ravenports.git] / bucket_77 / syncthing
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               syncthing
4 VERSION=                1.14.0
5 KEYWORDS=               net
6 VARIANTS=               standard
7 SDESC[standard]=        Open Source Continuous File Synchronization
8 HOMEPAGE=               https://syncthing.net/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main qtls quic
12 SITES[main]=            https://github.com/syncthing/syncthing/releases/download/v1.14.0/
13 DISTFILE[1]=            syncthing-source-v1.14.0.tar.gz:main
14 DF_INDEX=               1
15 SPKGS[standard]=        single
16
17 OPTIONS_AVAILABLE=      none
18 OPTIONS_STANDARD=       none
19
20 BUILD_DEPENDS=          golang:single:standard
21
22 USERS=                  syncthing
23 GROUPS=                 syncthing
24 USERGROUP_SPKG=         single
25
26 EXTRACT_DIRTY=          1
27
28 LICENSE=                MPL:single
29 LICENSE_FILE=           MPL:{{WRKSRC}}/syncthing/LICENSE
30 LICENSE_SCHEME=         solo
31
32 FPC_EQUIVALENT=         net/syncthing
33
34 MAKE_ENV=               CGO_ENABLED=0
35                         GOFLAGS="-mod=vendor"
36
37 RC_SUBR=                syncthing:single
38                         syncthing-discosrv:single
39                         syncthing-relaysrv:single
40                         syncthing-relaypoolsrv:single
41
42 do-build:
43         cd ${WRKSRC}/syncthing &&\
44         ${SETENV} ${MAKE_ENV} go run build.go -version v1.14.0 -no-upgrade build &&\
45         ${SETENV} ${MAKE_ENV} go run build.go -version v1.14.0 -no-upgrade build stdiscosrv &&\
46         ${SETENV} ${MAKE_ENV} go run build.go -version v1.14.0 -no-upgrade build strelaysrv &&\
47         ${SETENV} ${MAKE_ENV} go run build.go -version v1.14.0 -no-upgrade build strelaypoolsrv
48
49 do-install:
50         cd ${WRKSRC}/syncthing && ${INSTALL_PROGRAM} \
51                 syncthing stdiscosrv strelaysrv strelaypoolsrv \
52                 ${STAGEDIR}${PREFIX}/bin
53
54 [FILE:260:descriptions/desc.single]
55 Syncthing replaces proprietary sync and cloud services with something
56 open, trustworthy and decentralized. Your data is yours alone and you
57 deserve to choose where it is stored, if it is shared with some third
58 party and how it's transmitted over the Internet.
59
60
61 [FILE:110:distinfo]
62 55a6fb08a9dbc1a31a6b429a16abb3a76d8c24b491a86a52170ddaadea33f683     11729886 syncthing-source-v1.14.0.tar.gz
63
64
65 [FILE:56:manifests/plist.single]
66 bin/
67  stdiscosrv
68  strelaypoolsrv
69  strelaysrv
70  syncthing
71
72
73 [FILE:2776:files/syncthing-discosrv.in]
74 #!/bin/sh
75 #
76 # PROVIDE: syncthingdiscosrv
77 # REQUIRE: DAEMON
78 # KEYWORD: shutdown
79 #
80 # Add the following lines to /etc/rc.conf.local or /etc/rc.conf
81 # to enable this service:
82 #
83 # syncthingdiscosrv_enable (bool):      Set to NO by default.
84 #                                       Set it to YES to enable syncthing-discosrv.
85 # syncthingdiscosrv_user (user):        Set user to run syncthing-discosrv.
86 #                                       Default is "syncthing".
87 # syncthingdiscosrv_group (group):      Set group to run syncthing-discosrv.
88 #                                       Default is "syncthing".
89 # syncthingdiscosrv_dir (dir):          Set dir to run syncthing-discosrv in.
90 #                                       Default is "/var/db/syncthing-discosrv".
91 # syncthingdiscosrv_log_file (path):    Syncthing log file
92 #                                       Default: /var/log/syncthing-discosrv.log
93 # syncthingdiscosrv_key (file):         Set key file to use
94 #                                       Default is "${syncthingdiscosrv_dir}/syncthing.key".
95 # syncthingdiscosrv_cert (file):        Set cert file to use
96 #                                       Default is "${syncthingdiscosrv_dir}/syncthing.cert".
97 # syncthingdiscosrv_args (string):      Extra args to pass to syncthing-discosrv
98 #                                       Default is ""
99
100 . /etc/rc.subr
101
102 name=syncthingdiscosrv
103 rcvar=syncthingdiscosrv_enable
104
105 load_rc_config $name
106
107 : ${syncthingdiscosrv_enable:="NO"}
108 : ${syncthingdiscosrv_user:="syncthing"}
109 : ${syncthingdiscosrv_group:="syncthing"}
110 : ${syncthingdiscosrv_dir:="/var/db/syncthing-discosrv"}
111 : ${syncthingdiscosrv_log_file=/var/log/syncthing-discosrv.log}
112 : ${syncthingdiscosrv_key:="${syncthingdiscosrv_dir}/syncthing.key"}
113 : ${syncthingdiscosrv_cert:="${syncthingdiscosrv_dir}/syncthing.cert"}
114
115 export STNORESTART=true
116
117 pidfile=/var/run/syncthingdiscosrv.pid
118 procname="%%PREFIX%%/bin/stdiscosrv"
119 command="/usr/sbin/daemon"
120 command_args="-p ${pidfile} ${procname} -key ${syncthingdiscosrv_key} -cert ${syncthingdiscosrv_cert} ${syncthingdiscosrv_args} >> ${syncthingdiscosrv_log_file}"
121 syncthingdiscosrv_chdir=${syncthingdiscosrv_dir}
122
123 start_precmd=syncthingdiscosrv_startprecmd
124
125 syncthingdiscosrv_startprecmd()
126 {
127         if [ ! -e ${pidfile} ]; then
128                 install -o ${syncthingdiscosrv_user} -g ${syncthingdiscosrv_group} /dev/null ${pidfile};
129         fi
130
131         if [ ! -d ${syncthingdiscosrv_dir} ]; then
132                 install -d -o ${syncthingdiscosrv_user} -g ${syncthingdiscosrv_group} ${syncthingdiscosrv_dir}
133         fi
134         if [ ! -e ${syncthingdiscosrv_log_file} ]; then
135                 install -o ${syncthingdiscosrv_user} -g ${syncthingdiscosrv_group} /dev/null ${syncthingdiscosrv_log_file};
136         fi
137 }
138
139 run_rc_command "$1"
140
141
142 [FILE:2440:files/syncthing-relaypoolsrv.in]
143 #!/bin/sh
144 #
145 # PROVIDE: syncthingrelaypoolsrv
146 # REQUIRE: DAEMON
147 # KEYWORD: shutdown
148 #
149 # Add the following lines to /etc/rc.conf.local or /etc/rc.conf
150 # to enable this service:
151 #
152 # syncthingrelaypoolsrv_enable (bool):      Set to NO by default.
153 #                                           Set it to YES to enable syncthing-relaypoolsrv.
154 # syncthingrelaypoolsrv_user (user):        Set user to run syncthing-relaypoolsrv.
155 #                                           Default is "syncthing".
156 # syncthingrelaypoolsrv_group (group):      Set group to run syncthing-relaypoolsrv.
157 #                                           Default is "syncthing".
158 # syncthingrelaypoolsrv_dir (dir):          Set dir to run syncthing-relaypoolsrv in.
159 #                                           Default is "/var/db/syncthing-relaypoolsrv".
160 # syncthingrelaypoolsrv_log_file (path):    Syncthing log file
161 #                                           Default: /var/log/syncthing-relaypoolsrv.log
162 # syncthingrelaypoolsrv_args (string):      Extra args to pass to syncthing-relaypoolsrv
163 #                                           Default is ""
164
165 . /etc/rc.subr
166
167 name=syncthingrelaypoolsrv
168 rcvar=syncthingrelaypoolsrv_enable
169
170 load_rc_config $name
171
172 : ${syncthingrelaypoolsrv_enable:="NO"}
173 : ${syncthingrelaypoolsrv_user:="syncthing"}
174 : ${syncthingrelaypoolsrv_group:="syncthing"}
175 : ${syncthingrelaypoolsrv_dir:="/var/db/syncthing-relaypoolsrv"}
176 : ${syncthingrelaypoolsrv_log_file=/var/log/syncthing-relaypoolsrv.log}
177
178 export STNORESTART=true
179
180 pidfile=/var/run/syncthingrelaypoolsrv.pid
181 procname="%%PREFIX%%/bin/strelaypoolsrv"
182 command="/usr/sbin/daemon"
183 command_args="-c -p ${pidfile} ${procname} -keys ${syncthingrelaypoolsrv_dir} ${syncthingrelaypoolsrv_args} >> ${syncthingrelaypoolsrv_log_file} 2>&1"
184
185 start_precmd=syncthingrelaypoolsrv_startprecmd
186
187 syncthingrelaypoolsrv_startprecmd()
188 {
189         if [ ! -e ${pidfile} ]; then
190                 install -o ${syncthingrelaypoolsrv_user} -g ${syncthingrelaypoolsrv_group} /dev/null ${pidfile};
191         fi
192
193         if [ ! -d ${syncthingrelaypoolsrv_dir} ]; then
194                 install -d -o ${syncthingrelaypoolsrv_user} -g ${syncthingrelaypoolsrv_group} ${syncthingrelaypoolsrv_dir}
195         fi
196         if [ ! -e ${syncthingrelaypoolsrv_log_file} ]; then
197                 install -o ${syncthingrelaypoolsrv_user} -g ${syncthingrelaypoolsrv_group} /dev/null ${syncthingrelaypoolsrv_log_file};
198         fi
199 }
200
201 run_rc_command "$1"
202
203
204 [FILE:2564:files/syncthing-relaysrv.in]
205 #!/bin/sh
206 #
207 # PROVIDE: syncthingrelaysrv
208 # REQUIRE: DAEMON
209 # KEYWORD: shutdown
210 #
211 # Add the following lines to /etc/rc.conf.local or /etc/rc.conf
212 # to enable this service:
213 #
214 # syncthingrelaysrv_enable (bool):      Set to NO by default.
215 #                                       Set it to YES to enable syncthing-relaysrv.
216 # syncthingrelaysrv_user (user):        Set user to run syncthing-relaysrv.
217 #                                       Default is "syncthing".
218 # syncthingrelaysrv_group (group):      Set group to run syncthing-relaysrv.
219 #                                       Default is "syncthing".
220 # syncthingrelaysrv_dir (dir):          Set dir to run syncthing-relaysrv in.
221 #                                       Default is "/var/db/syncthing-relaysrv".
222 # syncthingrelaysrv_log_file (path):    Syncthing log file
223 #                                       Default: /var/log/syncthing-relaysrv.log
224 # syncthingrelaysrv_key (file):         Set key file to use
225 #                                       Default is "${syncthingrelaysrv_dir}/syncthing.key".
226 # syncthingrelaysrv_cert (file):        Set cert file to use
227 #                                       Default is "${syncthingrelaysrv_dir}/syncthing.cert".
228 # syncthingrelaysrv_args (string):      Extra args to pass to syncthing-relaysrv
229 #                                       Default is ""
230
231 . /etc/rc.subr
232
233 name=syncthingrelaysrv
234 rcvar=syncthingrelaysrv_enable
235
236 load_rc_config $name
237
238 : ${syncthingrelaysrv_enable:="NO"}
239 : ${syncthingrelaysrv_user:="syncthing"}
240 : ${syncthingrelaysrv_group:="syncthing"}
241 : ${syncthingrelaysrv_dir:="/var/db/syncthing-relaysrv"}
242 : ${syncthingrelaysrv_log_file=/var/log/syncthing-relaysrv.log}
243
244 export STNORESTART=true
245
246 pidfile=/var/run/syncthingrelaysrv.pid
247 procname="%%PREFIX%%/bin/strelaysrv"
248 command="/usr/sbin/daemon"
249 command_args="-c -p ${pidfile} ${procname} -keys ${syncthingrelaysrv_dir} ${syncthingrelaysrv_args} >> ${syncthingrelaysrv_log_file} 2>&1"
250
251 start_precmd=syncthingrelaysrv_startprecmd
252
253 syncthingrelaysrv_startprecmd()
254 {
255         if [ ! -e ${pidfile} ]; then
256                 install -o ${syncthingrelaysrv_user} -g ${syncthingrelaysrv_group} /dev/null ${pidfile};
257         fi
258
259         if [ ! -d ${syncthingrelaysrv_dir} ]; then
260                 install -d -o ${syncthingrelaysrv_user} -g ${syncthingrelaysrv_group} ${syncthingrelaysrv_dir}
261         fi
262         if [ ! -e ${syncthingrelaysrv_log_file} ]; then
263                 install -o ${syncthingrelaysrv_user} -g ${syncthingrelaysrv_group} /dev/null ${syncthingrelaysrv_log_file};
264         fi
265 }
266
267 run_rc_command "$1"
268
269
270 [FILE:1868:files/syncthing.in]
271 #!/bin/sh
272 #
273 # PROVIDE: syncthing
274 # REQUIRE: DAEMON
275 # KEYWORD: shutdown
276 #
277 # Add the following lines to /etc/rc.conf.local or /etc/rc.conf
278 # to enable this service:
279 #
280 # syncthing_enable (bool):      Set to NO by default.
281 #                               Set it to YES to enable syncthing.
282 # syncthing_home (path):        Directory where syncthing configuration
283 #                               data is stored.
284 #                               Default: %%PREFIX%%/etc/syncthing
285 # syncthing_log_file (path):    Syncthing log file
286 #                               Default: /var/log/syncthing.log
287 # syncthing_user (user):        Set user to run syncthing.
288 #                               Default is "syncthing".
289 # syncthing_group (group):      Set group to run syncthing.
290 #                               Default is "syncthing".
291
292 . /etc/rc.subr
293
294 name=syncthing
295 rcvar=syncthing_enable
296
297 load_rc_config $name
298
299 : ${syncthing_enable:="NO"}
300 : ${syncthing_home=%%PREFIX%%/etc/syncthing}
301 : ${syncthing_log_file=/var/log/syncthing.log}
302 : ${syncthing_user:="syncthing"}
303 : ${syncthing_group=${syncthing_group:-$syncthing_user}}
304
305 pidfile=/var/run/syncthing.pid
306 procname="%%PREFIX%%/bin/syncthing"
307 command="/usr/sbin/daemon"
308 command_args="-cf -p ${pidfile} ${procname} ${syncthing_home:+-home=${syncthing_home}} ${syncthing_log_file:+-logfile=${syncthing_log_file}} -no-browser ${syncthing_args}"
309
310 start_precmd=syncthing_startprecmd
311
312 syncthing_startprecmd()
313 {
314         if [ ! -e ${pidfile} ]; then
315                 install -o ${syncthing_user} -g ${syncthing_group} /dev/null ${pidfile};
316         fi
317
318         if [ ! -d ${syncthing_home} ]; then
319                 install -d -o ${syncthing_user} -g ${syncthing_group} ${syncthing_home}
320         fi
321
322         if [ ! -e ${syncthing_log_file} ]; then
323                 install -o ${syncthing_user} -g ${syncthing_group} /dev/null ${syncthing_log_file};
324         fi
325 }
326
327 run_rc_command "$1"
328