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