dev-libs/*: Update Manifest hashes
[gentoo.git] / dev-libs / go-fuse / go-fuse-0_p20150422.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit eutils
7
8 GO_PN=github.com/hanwen/${PN}
9 EGIT_COMMIT="ffed29ec8b88f61c1b8954134cc48ef03bb26ce1"
10
11 HOMEPAGE="https://${GO_PN}"
12 DESCRIPTION="FUSE bindings for Go"
13 SRC_URI="https://${GO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
14
15 SLOT="0"
16 LICENSE="BSD"
17 KEYWORDS="~amd64"
18 IUSE=""
19
20 DEPEND=">=dev-lang/go-1.3"
21 RDEPEND=""
22
23 RESTRICT="strip"
24
25 src_unpack() {
26         default_src_unpack
27         mkdir -p "${S}/src/${GO_PN%/*}" || die
28         mv ${PN}-${EGIT_COMMIT} "${S}/src/${GO_PN}" || die
29         egit_clean
30 }
31
32 call_go() {
33         local d
34         for d in fuse fuse/pathfs zipfs unionfs; do
35                 GOROOT="${GOROOT}" GOPATH="${S}" \
36                         go "${1}" -v -x -work ${GO_PN}/${d} || die
37         done
38 }
39
40 src_compile() {
41         # Create a filtered GOROOT tree out of symlinks,
42         # excluding go-fuse, for bug #503324.
43         GOROOT="${WORKDIR}/goroot"
44         cp -sR /usr/lib/go "${GOROOT}" || die
45         rm -rf "${GOROOT}/src/${GO_PN}" || die
46         rm -rf "${GOROOT}/pkg/linux_${ARCH}/${GO_PN}" || die
47         call_go build
48 }
49
50 src_install() {
51         call_go install
52         insopts -m0644 -p # preserve timestamps for bug 551486
53         insinto /usr/lib/go
54         doins -r pkg src
55 }