void-packages/srcpkgs/syncthing/template
2019-10-03 19:33:50 +02:00

46 lines
1.3 KiB
Bash

# Template file for 'syncthing'
pkgname=syncthing
version=1.3.0
revision=1
build_style=go
go_import_path="github.com/syncthing/syncthing"
go_package="${go_import_path}/cmd/strelaysrv ${go_import_path}/cmd/syncthing"
go_build_tags="noupgrade"
go_ldflags="-X github.com/syncthing/syncthing/lib/build.Version=v${version}"
hostmakedepends="git"
short_desc="Open Source Continuous File Synchronization"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="MPL-2.0"
changelog="https://github.com/syncthing/syncthing/releases"
homepage="http://syncthing.net/"
distfiles="https://github.com/syncthing/${pkgname}/archive/v${version}.tar.gz"
checksum=c6bb52c108a30a610afcc1023949674ca66f24127cbd569ab64789f0071d72e7
pre_build() {
GOARCH= go run script/genassets.go gui > ./lib/auto/gui.files.go
}
post_install() {
vinstall etc/firewall-ufw/syncthing 644 etc/ufw/applications.d
vlicense LICENSE
vdoc README.md
}
syncthing-relaysrv_package() {
short_desc+=" - relay server"
license="MIT"
replaces="relaysrv>=0.12.18_2"
provides="relaysrv-${version}_${revision}"
system_accounts="relaysrv"
relaysrv_homedir="/var/lib/relaysrv"
make_dirs="
/var/log/relaysrv 700 root root
/var/lib/relaysrv 700 relaysrv relaysrv"
pkg_install() {
vmove usr/bin/strelaysrv
vlicense cmd/strelaysrv/LICENSE
vsv relaysrv
}
}