From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1443443-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 403DB158094
	for <garchives@archives.gentoo.org>; Tue,  4 Oct 2022 12:50:34 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5AB1CE094A;
	Tue,  4 Oct 2022 12:50:33 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 418F9E094A
	for <gentoo-commits@lists.gentoo.org>; Tue,  4 Oct 2022 12:50:33 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 4872A340F7E
	for <gentoo-commits@lists.gentoo.org>; Tue,  4 Oct 2022 12:50:32 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 94FDC602
	for <gentoo-commits@lists.gentoo.org>; Tue,  4 Oct 2022 12:50:30 +0000 (UTC)
From: "Marek Szuba" <marecki@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" <marecki@gentoo.org>
Message-ID: <1664887822.90ac7015750e6c20b86e7f3aa9a1a976cc2d2caa.marecki@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/syncthing/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-p2p/syncthing/Manifest net-p2p/syncthing/syncthing-1.22.0.ebuild
X-VCS-Directories: net-p2p/syncthing/
X-VCS-Committer: marecki
X-VCS-Committer-Name: Marek Szuba
X-VCS-Revision: 90ac7015750e6c20b86e7f3aa9a1a976cc2d2caa
X-VCS-Branch: master
Date: Tue,  4 Oct 2022 12:50:30 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 5da54b40-d638-444c-9692-f652b5876d63
X-Archives-Hash: cb9c203c1378357518e32f84d494ca43

commit:     90ac7015750e6c20b86e7f3aa9a1a976cc2d2caa
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  4 12:19:24 2022 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Oct  4 12:50:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90ac7015

net-p2p/syncthing: add 1.22.0

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 net-p2p/syncthing/Manifest                |   2 +
 net-p2p/syncthing/syncthing-1.22.0.ebuild | 111 ++++++++++++++++++++++++++++++
 2 files changed, 113 insertions(+)

diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest
index 9026c1ecd31a..57c3ef1213e1 100644
--- a/net-p2p/syncthing/Manifest
+++ b/net-p2p/syncthing/Manifest
@@ -2,3 +2,5 @@ DIST syncthing-1.19.2-deps.tar.xz 206531144 BLAKE2B 88e5246217f792c8258f0074ecb3
 DIST syncthing-1.19.2.tar.gz 6197504 BLAKE2B 0db0f286a79ef8b9c4b74f9aa2da275f216d0a1cb5e10ec7fbd9a479c55f81ec8b8c06b2dbea6aed135eccf6bf539499c8852a8586bd37c4d0ba9969503a2114 SHA512 51641574e01daf591083e00aa956aeb0b6820eeb660c34dc0c161d2edfc183786dfa3bf50f75b6502b73440e3666672e651f0afc75c26cabbb457f0591d75f89
 DIST syncthing-1.21.0-deps.tar.xz 96707392 BLAKE2B 3cbf6d98758a453f16717ec974cb1fdb3ce2e5b2634fcc49a2385f047cf477fad6def173965d3b1b37554d58f95fa73d370a2d1c0a2e58f4b2a8fa580774a2ff SHA512 0d0d4bdfbed7d821364f87f53dee5557f015117b1cf96da9f9e2a9487c7b19a2126b6be8c604370ed4a83ab15612b4386cd1572bf48a673abf5b66c6fde92064
 DIST syncthing-1.21.0.tar.gz 6319691 BLAKE2B 390a06ff41ed1b023941d958d8112f9c503c296cc47a5bb6d6baa55d81f6cbd431c725cc6493b041a96734e56c9a267c6a3b4c564b67ab320cd7f9d46e173320 SHA512 ad613da2c3aaa4792703e69dde0ab3ace3a92f20b968a2d7c02d6ec3b6ce2d53a6c3d6b64c41c58ca8296bf722e689cd8ca34c05fd0dd32d8005d31b5f860d58
+DIST syncthing-1.22.0-deps.tar.xz 97369828 BLAKE2B ad8fbaf51f6d07f1f034e52c457c4a6da432faee43cb66fe23c77a49d01e333403616aadd7643bcbbcef6403e3574a0a30dbf0e6bffb196ae30ba1bc70602577 SHA512 da054614abed605b54bbdb189d9c352a887c817c72f123fc6dde66923fc7d0bed551055c17eae4b88f1f347c3f85362b436267bb2ac9adb8297c3257777d9b38
+DIST syncthing-1.22.0.tar.gz 6345841 BLAKE2B 96c17290c971224d90be661cb80f95fceddee61dd9c90437d051ac48954802fd66ae0178f784238e99f0c63cdaf5c12768bcd679bb91a4728fa86536a24f90a7 SHA512 151119ad526e4c9cddb6889449c43fcc7f91dd3c4bd44cb5e4f40839c55202d8fcd8dff9212e4f0fdf0176c97dfe904d3cf68fdd7c609942344a13f534652c0d

diff --git a/net-p2p/syncthing/syncthing-1.22.0.ebuild b/net-p2p/syncthing/syncthing-1.22.0.ebuild
new file mode 100644
index 000000000000..4f3b90d5f252
--- /dev/null
+++ b/net-p2p/syncthing/syncthing-1.22.0.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2022 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"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+	https://dev.gentoo.org/~marecki/dists/${CATEGORY}/${PN}/${P}-deps.tar.xz"
+
+LICENSE="Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT MPL-2.0 Unlicense"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~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 )"
+
+DOCS=( README.md AUTHORS CONTRIBUTING.md )
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.3.4-TestIssue5063_timeout.patch
+	"${FILESDIR}"/${PN}-1.18.4-tool_users.patch
+)
+
+src_prepare() {
+	# Bug #679280
+	xdg_environment_reset
+
+	default
+	sed -i \
+		's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/stdiscosrv|' \
+		cmd/stdiscosrv/etc/linux-systemd/stdiscosrv.service \
+		|| die
+	sed -i \
+		's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/strelaysrv|' \
+		cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \
+		|| die
+
+	# We do not need this and it sometimes causes build failures
+	rm -rf cmd/stupgrades
+}
+
+src_compile() {
+	GOARCH= go run build.go -version "v${PV}" -no-upgrade -build-out=bin/ \
+		${GOARCH:+-goarch="${GOARCH}"} \
+		build $(usex tools "all" "") || die "build failed"
+}
+
+src_test() {
+	go run build.go test || die "test failed"
+}
+
+src_install() {
+	local icon_size
+
+	doman man/*.[157]
+	einstalldocs
+
+	dobin bin/syncthing
+
+	domenu etc/linux-desktop/*.desktop
+	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
+
+	if use tools; then
+		exeinto /usr/libexec/syncthing
+		local exe
+		for exe in bin/* ; do
+			[[ "${exe}" == "bin/syncthing" ]] || doexe "${exe}"
+		done
+	fi
+
+	systemd_dounit etc/linux-systemd/system/${PN}{@,-resume}.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}
+
+	if use tools; then
+		systemd_dounit cmd/stdiscosrv/etc/linux-systemd/stdiscosrv.service
+		newconfd "${FILESDIR}"/stdiscosrv.confd stdiscosrv
+		newinitd "${FILESDIR}"/stdiscosrv.initd-r1 stdiscosrv
+
+		systemd_dounit cmd/strelaysrv/etc/linux-systemd/strelaysrv.service
+		newconfd "${FILESDIR}"/strelaysrv.confd strelaysrv
+		newinitd "${FILESDIR}"/strelaysrv.initd-r1 strelaysrv
+
+		insinto /etc/logrotate.d
+		newins "${FILESDIR}"/stdiscosrv.logrotate strelaysrv
+		newins "${FILESDIR}"/strelaysrv.logrotate strelaysrv
+	fi
+}
+
+pkg_postinst() {
+	xdg_desktop_database_update
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+}