commit:     4a6300dcd54d9152be1e025c1c4b1fbd47653b75
Author:     Louis Sautier <sautier.louis <AT> gmail <DOT> com>
AuthorDate: Thu Jul 21 22:34:58 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Sat Jul 23 21:08:35 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a6300dc

net-p2p/syncthing: bump to 0.14.0

Gentoo-Bug: https://bugs.gentoo.org/589236
Gentoo-Bug: https://bugs.gentoo.org/589504
Package-Manager: portage-2.3.0
Closes: https://github.com/gentoo/gentoo/pull/1940

Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 net-p2p/syncthing/Manifest                |   1 +
 net-p2p/syncthing/syncthing-0.14.0.ebuild | 111 ++++++++++++++++++++++++++++++
 2 files changed, 112 insertions(+)

diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest
index bf1ade2..ec527aa 100644
--- a/net-p2p/syncthing/Manifest
+++ b/net-p2p/syncthing/Manifest
@@ -1,3 +1,4 @@
 DIST syncthing-0.13.10.tar.gz 4292039 SHA256 
a86c7948afabc6e7b07f217d5200fb1e36cde5bb13373d99cc67d5dc991ce3be SHA512 
199c38644a7e5d43777ca2e497d5304d8e77485d21aeed9a00efc74dd98bfb0c473dd0bf3230b8e1e9742315915419f198bb8d0a9b294d2f6fe918b6e0175812
 WHIRLPOOL 
a6f82ce032455e78122b9958ddab885b187bd7d46e1a00ca64f855d1ad6e3c25538b8304318ce7fba7753bd1ee17a91325a774ed27d8f1bcb635915937742b96
 DIST syncthing-0.13.7.tar.gz 4331253 SHA256 
c487a489504e48bc7a94f25322da5485c23b3a8e3df2832b2454556ab86552c8 SHA512 
8e00355f9774329cb4da1173ad27528213520644c32d5b5ba2345b93787bc762d0498c33ccf2d72e91b770258e8a55d86573934baeff0bc0799416850320c82b
 WHIRLPOOL 
688ef2a997e3e3ad4a23b5baeba6566d39938b007092f40e767db6f6a92c33069bf0ee3afdee2df848a2edfee7846cfb3fbabdc81dcf1a40e795feafae29a221
 DIST syncthing-0.13.9.tar.gz 4334897 SHA256 
1b0a00ddbcbc88d8310741a2b0853266fe1980c427aa415ed6faa9f03dd52912 SHA512 
07939eb068b417a8dc0ad4a868e5b5fd22ff14297e0b77d0d08fc14631d3ffe957da3ad4a745a4f37bae4a3bed8ac98a859037273b040a8abc88f7d5a67dc871
 WHIRLPOOL 
264a17f553a7d56a792f4949560dfc4eefbfab6c3dedd07e0ada5ec02d7ed97d2c196aa4a770630b6a3bb02879a9b462ddd5f95d58217f45874ff162206cf6d7
+DIST syncthing-0.14.0.tar.gz 6368723 SHA256 
bfa25ee766be4fb53c98df9aad99f57e562715280ed73445abe15ce2a713588e SHA512 
68202cdd1db1c7cee77345e9c4786b4b3c97f69fb13df0b7450e40a2eacea75315324998a5e8286968cc5d462276dd75d4622f12038753734a09aae6ade6ac9e
 WHIRLPOOL 
37da9eaff26f16fbafc30b1aa0b90b129832b85fc5cb95995a7d9570cbcdec40307b4d10a6547fbd6252bcd83b19a9a23fd9c618012eea4bf53cf89cbb8bc20a

diff --git a/net-p2p/syncthing/syncthing-0.14.0.ebuild 
b/net-p2p/syncthing/syncthing-0.14.0.ebuild
new file mode 100644
index 0000000..2127bd1
--- /dev/null
+++ b/net-p2p/syncthing/syncthing-0.14.0.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+EGO_PN="github.com/syncthing/syncthing"
+EGIT_COMMIT=v${PV}
+
+inherit golang-vcs-snapshot systemd user versionator
+
+DESCRIPTION="Open Source Continuous File Synchronization"
+HOMEPAGE="https://syncthing.net";
+SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm"
+IUSE="tools"
+
+DOCS="README.md AUTHORS CONTRIBUTING.md"
+
+pkg_setup() {
+       enewgroup ${PN}
+       enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+
+       if use tools ; then
+               # separate user for relaysrv
+               enewgroup ${PN}-relaysrv
+               enewuser ${PN}-relaysrv -1 -1 /var/lib/${PN}-relaysrv 
${PN}-relaysrv
+       fi
+}
+
+src_prepare() {
+       default
+       sed -i \
+               's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/relaysrv|' \
+               
src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \
+               || die
+}
+
+src_compile() {
+       export GOPATH="${S}:$(get_golibdir_gopath)"
+       cd src/${EGO_PN} || die
+       # If we pass "build" to build.go, it builds only syncthing itself, and
+       # places the binary in the root folder. If we do not pass "build", all 
the
+       # tools are built, and all binaries are placed in folder ./bin.
+       ST_BUILD="build"
+       if use tools ; then
+               ST_BUILD=""
+       fi
+       go run build.go -version "v${PV}" -no-upgrade ${ST_BUILD} || die "build 
failed"
+}
+
+src_test() {
+       cd src/${EGO_PN} || die
+       go run build.go test || die "test failed"
+}
+
+src_install() {
+       cd src/${EGO_PN} || die
+       doman man/*.[157]
+
+       if use tools ; then
+               dobin bin/syncthing
+               exeinto /usr/libexec/syncthing
+               for exe in bin/* ; do
+                       [ "${exe}" = "bin/syncthing" ] || doexe "${exe}"
+               done
+       else
+               dobin syncthing
+       fi
+
+       # openrc and systemd service files
+       systemd_dounit 
"${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}@.service \
+               
"${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}-resume.service
+       systemd_douserunit 
"${S}"/src/${EGO_PN}/etc/linux-systemd/user/${PN}.service
+       newconfd "${FILESDIR}/${PN}.confd" ${PN}
+       newinitd "${FILESDIR}/${PN}.initd" ${PN}
+
+       keepdir /var/{lib,log}/${PN}
+       fowners ${PN}:${PN} /var/{lib,log}/${PN}
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+       if use tools ; then
+               # openrc and systemd service files
+               systemd_dounit 
"${S}"/src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service
+               newconfd "${FILESDIR}/${PN}-relaysrv.confd" ${PN}-relaysrv
+               newinitd "${FILESDIR}/${PN}-relaysrv.initd" ${PN}-relaysrv
+
+               keepdir /var/lib/${PN}-relaysrv
+               fowners ${PN}-relaysrv:${PN}-relaysrv /var/{lib,log}/${PN}
+
+               insinto /etc/logrotate.d
+               newins "${FILESDIR}/syncthing-relaysrv.logrotate" 
syncthing-relaysrv
+       fi
+}
+
+pkg_postinst() {
+       local v
+    for v in ${REPLACING_VERSIONS}; do
+               if [[ $(get_version_component_range 2) -gt \
+                               $(get_version_component_range 2 ${v}) ]]; then
+                       ewarn "Version ${PV} is not protocol-compatible with 
version" \
+                               "0.$(($(get_version_component_range 2) - 1)).x 
or lower."
+                       ewarn "Make sure all your devices are running at least 
version" \
+                               "0.$(get_version_component_range 2).0."
+               fi
+       done
+}

Reply via email to