summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2022-08-24 16:26:12 +0100
committerMarek Szuba <marecki@gentoo.org>2022-08-24 16:36:17 +0100
commit224231cbddca4442b921558a4a5633b0e28ec81a (patch)
treed5a2c42982ddc2e4b8c749377cba47afc2cf5e65 /net-p2p/syncthing
parentnet-analyzer/suricata: add USE=verify-sig support (diff)
downloadgentoo-224231cbddca4442b921558a4a5633b0e28ec81a.tar.gz
gentoo-224231cbddca4442b921558a4a5633b0e28ec81a.tar.bz2
gentoo-224231cbddca4442b921558a4a5633b0e28ec81a.zip
net-p2p/syncthing: add 1.20.4
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'net-p2p/syncthing')
-rw-r--r--net-p2p/syncthing/Manifest2
-rw-r--r--net-p2p/syncthing/syncthing-1.20.4.ebuild113
2 files changed, 115 insertions, 0 deletions
diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest
index 0993fc270020..8a9cf07bedf6 100644
--- a/net-p2p/syncthing/Manifest
+++ b/net-p2p/syncthing/Manifest
@@ -4,3 +4,5 @@ DIST syncthing-1.20.2-deps.tar.xz 96286888 BLAKE2B ddac0c324dc9fedfebb4e7b261dbe
DIST syncthing-1.20.2.tar.gz 6303918 BLAKE2B 4a9786558584ee3d11d7dc278e99d98a57b727dd2b1e61a82357bc4f9be5d025b3e5b003ae0d44e033991c8fe91aa9668dd653a8dedd200e4d385a827c361918 SHA512 f4abf939ce4023df8bd619d8be393dedc657a9e62d99b3793af32ca88a4478ba6640ccecd6b4ae009a06656e74bca3e462bef717ad17a6e9fa6ac00ef77ea137
DIST syncthing-1.20.3-deps.tar.xz 96198124 BLAKE2B 196bffdd1004a00545c046ac3f3f4a2db3f5c779c3e9d0f1fbe1417f8cd27f6b8969a7c4f8c515ad85abad9391b5dbf9b64a6acf949f17b982e6465658d296d2 SHA512 5f8b52af226c2e86be84bb5dfe06a1e76d21f90aaf84cd44d9724cb0c0f918bb80c88fe0fe2c70ff6942626659492ceb5b3d618efa65d401f63eeff8ab6052a0
DIST syncthing-1.20.3.tar.gz 6304903 BLAKE2B 61534220a633c8cf9b99e60a43032834874bdf6f3cfd26c81b578148a22ac0d3443f112e5763e3fb916cfea6d7f55564bdfec967e8fa83f0c9502f1dbbe8689c SHA512 429fb13de8b34459794d7c9dff66abe0e6c12086a27af71d90934c2ac09f2a332a103eaa7149baa0b1920ddb676380ab2c0fbcc025d80d032dd7d8d67284328a
+DIST syncthing-1.20.4-deps.tar.xz 95873400 BLAKE2B 79b5ee4cbb36f611530ffcaeb5e9650811f80358c36a51d5362c525d86741ee768baa073a167ca184cd3aa5795b01a7a5f1c6648b9f07ca77c868b9152940de4 SHA512 424cca4aafd18b672e0027cbe4dc3895605009c037fc4005bdb48a1cb06be96d8377477ee77ab910478e24db9833d48b34b1d45f83c4792356ae75f5225bc163
+DIST syncthing-1.20.4.tar.gz 6320013 BLAKE2B 0aefc7470be80af12c349572ca14de3e1eb18f2da5ad804e8ee5899da331e4b3c86c8bcb04c3fcc54a7f944551555d6df7ec5fe8f5ce760faf658e9bfd02650b SHA512 a7af905fedc2bbb709df2b05274e7c584ba340f7f6a2f311291d2650cd656ebf567a106be53453dbe889dabac2620deccc8da49cd80dc41c43f45b8016cec193
diff --git a/net-p2p/syncthing/syncthing-1.20.4.ebuild b/net-p2p/syncthing/syncthing-1.20.4.ebuild
new file mode 100644
index 000000000000..5d5f0fcee8c1
--- /dev/null
+++ b/net-p2p/syncthing/syncthing-1.20.4.ebuild
@@ -0,0 +1,113 @@
+# 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 )"
+# Bug #863488. Will no longer be needed come 1.21.0.
+BDEPEND="<dev-lang/go-1.19"
+
+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
+}