*/*: Bump copyright on files touched this year
[gentoo.git] / dev-libs / go-fuse / go-fuse-0_p20140812-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
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="8c85ded140ac1889372a0e22d8d21e3d10a303bd"
10
11 HOMEPAGE="https://github.com/hanwen/go-fuse"
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 S=${WORKDIR}
26
27 src_unpack() {
28         default_src_unpack
29         mkdir -p src/${GO_PN%/*} || die
30         mv ${PN}-${EGIT_COMMIT} src/${GO_PN} || die
31 }
32
33 src_prepare() {
34         sed -e "s:\(go \${target}\)\(.*\)$:\\1 -x \\2:" \
35                 -e 's:^for target in "clean" "install" ; do$:for target in "install" ; do:' \
36                 -e '17,26d' \
37                 src/${GO_PN}/all.bash > src/${GO_PN}/all.bash.patched || die
38 }
39
40 src_compile() {
41         # Create a filtered GOROOT tree out of symlinks,
42         # excluding go-fuse, for bug #503324.
43         cp -sR /usr/lib/go goroot || die
44         rm -rf goroot/src/${GO_PN} || die
45         rm -rf goroot/pkg/linux_${ARCH}/${GO_PN} || die
46         CGO_CFLAGS="${CFLAGS}" GOROOT="${WORKDIR}/goroot" GOPATH="${WORKDIR}" \
47                 bash src/${GO_PN}/all.bash.patched || die
48 }
49
50 src_install() {
51         insopts -m0644 -p # preserve timestamps for bug 551486
52         insinto /usr/lib/go
53         doins -r pkg
54         insinto /usr/lib/go/src
55         rm src/${GO_PN}/all.bash.patched || die
56         egit_clean src/${GO_PN}
57         doins -r src/*
58 }