84 lines
2.3 KiB
Bash
84 lines
2.3 KiB
Bash
# Template file for 'syncthing'
|
|
pkgname=syncthing
|
|
version=1.13.1
|
|
revision=1
|
|
build_style=go
|
|
go_import_path="github.com/syncthing/syncthing"
|
|
go_package="
|
|
${go_import_path}/cmd/stdiscosrv
|
|
${go_import_path}/cmd/stcli
|
|
${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"
|
|
homepage="http://syncthing.net/"
|
|
changelog="https://github.com/syncthing/syncthing/releases"
|
|
distfiles="https://github.com/syncthing/${pkgname}/archive/v${version}.tar.gz"
|
|
checksum=f4632a062f75d01629e625ccef9625313f5d371c5f9bee744b0b811d47b92e25
|
|
|
|
pre_build() {
|
|
GOARCH= go generate \
|
|
github.com/syncthing/syncthing/lib/api/auto \
|
|
github.com/syncthing/syncthing/cmd/strelaypoolsrv/auto
|
|
}
|
|
|
|
post_install() {
|
|
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
|
|
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() {
|
|
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
|
|
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
|
|
}
|
|
}
|
|
|
|
syncthing-inotify_package() {
|
|
build_style=meta
|
|
short_desc="Inotify file watcher for Syncthing (transitional dummy package)"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
}
|