dev-python/python-jose: x86 stable wrt bug #706146
[gentoo.git] / www-apps / hugo / hugo-0.58.3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit go-module bash-completion-r1
6
7 # The fork with prefetched vendor packages using `go mod vendor`
8 EGO_PN="github.com/g4s8/hugo"
9 GIT_COMMIT="e5194ddedf51ecb3a0c63cf5f5aa82a3be21c8cf"
10 KEYWORDS="~amd64"
11
12 DESCRIPTION="The world's fastest framework for building websites"
13 HOMEPAGE="https://gohugo.io https://github.com/gohugoio/hugo"
14 SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15 LICENSE="Apache-2.0 Unlicense BSD BSD-2 MPL-2.0"
16 SLOT="0"
17 IUSE="+sass +bash-completion"
18
19 RESTRICT="test"
20
21 src_compile() {
22         mkdir -pv bin || die
23         go build -ldflags \
24                 "-X ${EGO_PN}/hugolib.CommitHash=${GIT_COMMIT}" \
25                 $(usex sass "-tags extended" "") -o "${S}/bin/hugo" || die
26         bin/hugo gen man || die
27         if use bash-completion ; then
28                 bin/hugo gen autocomplete --completionfile hugo || die
29         fi
30 }
31
32 src_install() {
33         dobin bin/*
34         if use bash-completion ; then
35                 dobashcomp hugo || die
36         fi
37         doman man/*
38         dodoc README.md
39 }