diff --git a/net-p2p/syncthing/ChangeLog b/net-p2p/syncthing/ChangeLog index 706cf61..b65c014 100644 --- a/net-p2p/syncthing/ChangeLog +++ b/net-p2p/syncthing/ChangeLog @@ -1,3 +1,8 @@ +*syncthing-0.12.14 (21 Jan 2016) + + 21 Jan 2016; +syncthing-0.12.14.ebuild, files/syncthing: + net-p2p/syncthing: version bump + 13 Jan 2016; +files/syncthing: net-p2p/syncthing: added syncthing launcher file diff --git a/net-p2p/syncthing/files/syncthing b/net-p2p/syncthing/files/syncthing index 34f133c..0c0da5e 100644 --- a/net-p2p/syncthing/files/syncthing +++ b/net-p2p/syncthing/files/syncthing @@ -18,8 +18,7 @@ start_pre() { start() { ebegin "Starting Syncthing" start-stop-daemon --start --make-pidfile --pidfile ${pid_file} \ - --user ${SVCUSER} --group ${SVCUSER} --background --exec /usr/bin/syncthing -- --no-browser + --user ${SVCUSER} --group ${SVCUSER} --background --exec /usr/bin/syncthing -- -no-browser eend $? } diff --git a/net-p2p/syncthing/syncthing-0.12.14.ebuild b/net-p2p/syncthing/syncthing-0.12.14.ebuild new file mode 100644 index 0000000..3dd42f5 --- /dev/null +++ b/net-p2p/syncthing/syncthing-0.12.14.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils base systemd git-r3 + +DESCRIPTION="Open, trustworthy and decentralized syncing engine (some kind of analog of DropBox and BTSync)" +HOMEPAGE="http://syncthing.net" + +SRC_URI="" +EGIT_REPO_URI="https://github.com/syncthing/${PN}" +EGIT_COMMIT="v${PV}" + +LICENSE="MIT" +SLOT="0" +# No ~x86 keyword on godep in the tree +KEYWORDS="~amd64" + +COMMON_DEPEND="systemd? ( sys-apps/systemd )" +DEPEND=" + dev-lang/go + dev-go/godep +" +RDEPEND="${DEPEND}" + +DOCS=( README.md AUTHORS LICENSE CONTRIBUTING.md ) + +export GOPATH="${S}" + +GO_PN="github.com/syncthing/${PN}" +EGIT_CHECKOUT_DIR="${S}/src/${GO_PN}" +S="${EGIT_CHECKOUT_DIR}" + +src_compile() { + # XXX: All the stuff below needs for "-version" command to show actual info + local version="$(git describe --always | sed 's/\([v\.0-9]*\)\(-\(beta\|alpha\)[0-9]*\)\?-/\1\2+/')"; + local date="$(git show -s --format=%ct)"; + local user="$(whoami)" + local host="$(hostname)"; host="${host%%.*}"; + local lf="-w -X main.Version=${version} -X main.BuildStamp=${date} -X main.BuildUser=${user} -X main.BuildHost=${host}" + + godep go build -ldflags "${lf}" -tags noupgrade ./cmd/syncthing +} + +src_install() { + dobin syncthing + systemd_dounit "${S}/etc/linux-systemd/system/${PN}@.service" + systemd_douserunit "${S}/etc/linux-systemd/user/${PN}.service" + doinitd "${FILESDIR}/syncthing" + base_src_install_docs +} + +pkg_postinst() { + elog "To run Syncthing for more users, create a symlink to the syncthing init script from a link called" + elog "syncthing.username - like so" + elog " cd /etc/init.d" + elog " ln -s syncthing syncthing.username" +}