diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2014-11-22 13:39:02 +0200 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2014-11-22 13:39:02 +0200 |
commit | 21f0f4c17e9dc3b360f5df22540d06db26e13fb7 (patch) | |
tree | 6f8804740cbc17bae18247605f5639e941a613b1 /net-p2p | |
parent | b2d2dd5f2474e75a999c8f340c07f8bb162cdb4a (diff) |
Added go-lang based Syncthing and GoDep. Thanks mva :)
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/syncthing/syncthing-9999.ebuild | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/net-p2p/syncthing/syncthing-9999.ebuild b/net-p2p/syncthing/syncthing-9999.ebuild new file mode 100644 index 00000000..f93aeb6a --- /dev/null +++ b/net-p2p/syncthing/syncthing-9999.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: This ebuild is from mva overlay; Bumped by mva; $ + +EAPI="5" + +#if [ "$PV" != "9999" ]; then +# SRC_URI="https://github.com/calmh/${PN}/archive/v${PV}.tar.gz" +# KEYWORDS="~amd64 ~x86 ~arm ~darwin ~winnt ~fbsd" +#else + vcs="git-r3" + SRC_URI="" + EGIT_REPO_URI="https://github.com/syncthing/${PN}" + KEYWORDS="" +#fi + +inherit eutils base ${vcs} + +DESCRIPTION="Open, trustworthy and decentralized syncing engine (some kind of analog of DropBox and BTSync)" +HOMEPAGE="http://syncthing.net" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="" +IUSE="tools" + +DEPEND=" + dev-lang/go + app-misc/godep +" +RDEPEND="${DEPEND}" + +DOCS=( README.md CONTRIBUTORS 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 + + use tools && ( + godep go build ./cmd/stcli + godep go build ./cmd/stpidx + godep go build ./discover/cmd/discosrv + ) +} + +src_install() { + dobin syncthing + use tools && dobin stcli stpidx discosrv +} |