syncthing: add discosrv binary and manpages

Closes: #16477 [via git-merge-pr]
This commit is contained in:
Urs Schulz 2019-11-14 17:43:51 +01:00 committed by Duncaen
parent d2f369ad64
commit 5213c0d5fa
No known key found for this signature in database
GPG key ID: 335C1D17EC3D6E35
4 changed files with 43 additions and 3 deletions

1
srcpkgs/syncthing-discosrv Symbolic link
View file

@ -0,0 +1 @@
syncthing

View file

@ -0,0 +1,3 @@
#!/bin/sh
exec svlogd /var/log/discosrv

View file

@ -0,0 +1,8 @@
#!/bin/sh
[ -r conf ] && . ./conf
DISCO_ARGS="${DISCO_ARGS:--cert=/var/lib/discosrv/cert.pem -key=/var/lib/discosrv/key.pem}"
exec 2>&1
exec chpst -u _discosrv stdiscosrv $DISCO_ARGS

View file

@ -1,18 +1,21 @@
# Template file for 'syncthing' # Template file for 'syncthing'
pkgname=syncthing pkgname=syncthing
version=1.3.1 version=1.3.1
revision=1 revision=2
build_style=go build_style=go
go_import_path="github.com/syncthing/syncthing" go_import_path="github.com/syncthing/syncthing"
go_package="${go_import_path}/cmd/strelaysrv ${go_import_path}/cmd/syncthing" go_package="
${go_import_path}/cmd/stdiscosrv
${go_import_path}/cmd/strelaysrv
${go_import_path}/cmd/syncthing"
go_build_tags="noupgrade" go_build_tags="noupgrade"
go_ldflags="-X github.com/syncthing/syncthing/lib/build.Version=v${version}" go_ldflags="-X github.com/syncthing/syncthing/lib/build.Version=v${version}"
hostmakedepends="git" hostmakedepends="git"
short_desc="Open Source Continuous File Synchronization" short_desc="Open Source Continuous File Synchronization"
maintainer="Duncaen <duncaen@voidlinux.org>" maintainer="Duncaen <duncaen@voidlinux.org>"
license="MPL-2.0" license="MPL-2.0"
changelog="https://github.com/syncthing/syncthing/releases"
homepage="http://syncthing.net/" homepage="http://syncthing.net/"
changelog="https://github.com/syncthing/syncthing/releases"
distfiles="https://github.com/syncthing/${pkgname}/archive/v${version}.tar.gz" distfiles="https://github.com/syncthing/${pkgname}/archive/v${version}.tar.gz"
checksum=58a6cdddbecd08d84db763f7fd50642f4224e6d847fa575e674b11ba863c9e7a checksum=58a6cdddbecd08d84db763f7fd50642f4224e6d847fa575e674b11ba863c9e7a
@ -22,8 +25,15 @@ pre_build() {
post_install() { post_install() {
vinstall etc/firewall-ufw/syncthing 644 etc/ufw/applications.d vinstall etc/firewall-ufw/syncthing 644 etc/ufw/applications.d
vinstall etc/linux-desktop/syncthing-start.desktop 664 usr/share/applications
vinstall etc/linux-desktop/syncthing-ui.desktop 644 usr/share/applications
vlicense LICENSE vlicense LICENSE
vdoc README.md vdoc README.md
for f in man/syncthing*; do vman $f; done
for x in 32 64 128 256 512; do
vinstall assets/logo-${x}.png 644 "usr/share/icons/hicolor/${x}x${x}/apps" syncthing.png
done
vinstall assets/logo-only.svg 644 usr/share/icons/hicolor/scalable/apps syncthing.svg
} }
syncthing-relaysrv_package() { syncthing-relaysrv_package() {
@ -42,5 +52,23 @@ syncthing-relaysrv_package() {
vmove usr/bin/strelaysrv vmove usr/bin/strelaysrv
vlicense cmd/strelaysrv/LICENSE vlicense cmd/strelaysrv/LICENSE
vsv relaysrv vsv relaysrv
vman man/strelaysrv.1
}
}
syncthing-discosrv_package() {
short_desc+=" - discovery server"
system_accounts="_discosrv"
_discosrv_homedir="/var/lib/discosrv"
make_dirs="
/var/log/discosrv 700 root root
/var/lib/discosrv 700 _discosrv _discosrv"
pkg_install() {
vmove usr/bin/stdiscosrv
vlicense LICENSE
vsv discosrv
vman man/stdiscosrv.1
} }
} }