syncthing 2.0.8

This commit is contained in:
Hadrien Dussuel
2025-09-08 21:46:11 +02:00
parent f9714647da
commit dc6314135e
3 changed files with 125 additions and 0 deletions

View File

@@ -1,2 +1,3 @@
DIST syncthing-source-v2.0.5.tar.gz 62659547 BLAKE2B 27867445d2dccc21a363b203ced17515d7189f7c2f07e3e2617af28edb1299bf8f73f8a1c95f5e11887bc326ee791027df01d00cdbe42d617931c8aca29afaf1 SHA512 0e489bd409d52fca08221ac3d016125961b4c1d37e5de9db7be2e3703c78d12a436c61a3c6ca66891de5f53f5e22542308563fee88a5fa432ede5ed47321b113
DIST syncthing-source-v2.0.7.tar.gz 62661923 BLAKE2B 006eba7bbc21e1ed017b4254a40c0215852f46ca3d18a74a47786a080d551da0cbff7d57152f321b0d42ea64a0ad5a233082bcd5b7cfc72fa3ef47ea74fd8bd1 SHA512 229073618f3fff364ba7c5432b7ac6e6bfa19628ded89dbf7b515ab4069a48c6cd91c6d53369a8159b27797d8a1ff1d2150d63f5cf25c45097c9c99cf52b6de3
DIST syncthing-source-v2.0.8.tar.gz 62666559 BLAKE2B b980705b97f79447c7ec1eb811b8d426b1790d6f5c44bd5cfff260959ed186b197dc6f5b7627948e1dcb302417c77fb4c18748548bf9af38f5b7446f131c1375 SHA512 c8139c7ff3b1067db789c395ed8f78fdba38d731f9e2760d10eb5c0288bdfc3f9b05311b0852881f79ccb33fa1ac6ac609820bbf1ab89f83fcc09f11842bfb23

View File

@@ -0,0 +1,110 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop go-module systemd xdg-utils
DESCRIPTION="Open Source Continuous File Synchronization"
HOMEPAGE="https://syncthing.net https://github.com/syncthing/syncthing"
SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${PN}-source-v${PV}.tar.gz"
S="${WORKDIR}"/${PN}
LICENSE="MPL-2.0 Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT Unlicense"
SLOT="0"
KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86"
IUSE="selinux tools"
RDEPEND="
acct-group/syncthing
acct-user/syncthing
tools? (
>=acct-user/stdiscosrv-1
>=acct-user/strelaysrv-1
)
selinux? ( sec-policy/selinux-syncthing )
"
BDEPEND=">=dev-lang/go-1.21.0"
DOCS=( AUTHORS {GOALS,README}.md )
PATCHES=(
"${FILESDIR}"/${PN}-1.3.4-TestIssue5063_timeout.patch
"${FILESDIR}"/${PN}-1.18.4-tool_users.patch
"${FILESDIR}"/${PN}-1.29.5-remove_race_in_tests.patch #955442
)
src_prepare() {
# Bug #679280
xdg_environment_reset
default
local srv
for srv in st{disco,relay}srv; do
sed -i \
's|^ExecStart=.*|ExecStart=/usr/libexec/${PN}/${srv}|' \
cmd/${srv}/etc/linux-systemd/${srv}.service || die
done;
}
src_compile() {
GOARCH= CGO_ENABLED=1 go run build.go -version "v${PV}" -no-upgrade -build-out=bin/ \
${GOARCH:+-goarch="${GOARCH}"} \
build $(usev tools all) || die "build failed"
}
src_test() {
go run build.go test || die "test failed"
}
src_install() {
dobin bin/${PN}
doman man/*.[157]
einstalldocs
domenu etc/linux-desktop/${PN}-{start,ui}.desktop
local -i icon_size
for icon_size in 32 64 128 256 512; do
newicon -s ${icon_size} assets/logo-${icon_size}.png ${PN}.png
done
newicon -s scalable assets/logo-only.svg ${PN}.svg
systemd_dounit etc/linux-systemd/system/${PN}@.service
systemd_douserunit etc/linux-systemd/user/${PN}.service
newconfd "${FILESDIR}"/${PN}.confd ${PN}
newinitd "${FILESDIR}"/${PN}.initd-r2 ${PN}
keepdir /var/log/${PN}
insinto /etc/logrotate.d
newins "${FILESDIR}"/${PN}.logrotate ${PN}
insinto /etc/ufw/applications.d
doins etc/firewall-ufw/${PN}
if use tools; then
exeinto /usr/libexec/${PN}
insinto /etc/logrotate.d
local srv
for srv in st{disco,relay}srv; do
doexe bin/${srv}
systemd_dounit cmd/${srv}/etc/linux-systemd/${srv}.service
newconfd "${FILESDIR}"/${srv}.confd ${srv}
newinitd "${FILESDIR}"/${srv}.initd-r1 ${srv}
newins "${FILESDIR}"/${srv}.logrotate ${srv}
done
fi
}
pkg_postinst() {
xdg_desktop_database_update
xdg_icon_cache_update
}
pkg_postrm() {
xdg_desktop_database_update
xdg_icon_cache_update
}