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