/[gentoo-x86]/app-emulation/lxd/lxd-0.13.ebuild
Gentoo

Contents of /app-emulation/lxd/lxd-0.13.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Jul 19 20:36:34 2015 UTC (4 years, 2 months ago) by alunduil
Branch: MAIN
CVS Tags: HEAD
add version 0.13

* provided by Erik Mackdanz

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 11A8217C!)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6
7 DESCRIPTION="Fast, dense and secure container management"
8 HOMEPAGE="https://linuxcontainers.org/lxd/introduction/"
9 EGO_PN_PARENT="github.com/lxc"
10 EGO_PN="${EGO_PN_PARENT}/lxd"
11 SRC_URI="http://961db08fe45d5f5dd062-b8a7a040508aea6d369676e49b80719d.r29.cf2.rackcdn.com/${P}.tar.bz2"
12 LICENSE="Apache-2.0"
13 SLOT="0"
14 KEYWORDS="~amd64"
15
16 PLOCALES="de fr ja"
17 IUSE="nls test +image"
18
19 # IUSE and PLOCALES must be defined before l10n inherited
20 inherit bash-completion-r1 eutils golang-build l10n systemd user vcs-snapshot
21
22 DEPEND="
23 >=dev-lang/go-1.4.2:=
24 dev-libs/protobuf
25 dev-vcs/git
26 nls? ( sys-devel/gettext )
27 test? (
28 app-misc/jq
29 dev-db/sqlite
30 net-misc/curl
31 sys-devel/gettext
32 )
33 "
34
35 RDEPEND="
36 app-admin/cgmanager
37 app-arch/xz-utils
38 app-emulation/lxc[cgmanager]
39 net-analyzer/openbsd-netcat
40 net-misc/bridge-utils
41 virtual/acl
42 image? (
43 app-crypt/gnupg
44 >=dev-lang/python-3.2
45 )
46 "
47
48 # KNOWN ISSUES:
49 # - Translations may not work. I've been unsuccessful in forcing
50 # localized output. Anyway, upstream (Canonical) doesn't install the
51 # message files.
52
53 src_prepare() {
54 cd "${S}/src/${EGO_PN}"
55
56 # Upstream requires the openbsd flavor of netcat (with -U), but
57 # Gentoo installs that with a renamed binary
58 epatch "${FILESDIR}/${P}-nc-binary-name.patch"
59
60 # Warn on unhandled locale changes
61 l10n_find_plocales_changes po "" .po
62 }
63
64 src_compile() {
65 golang-build_src_compile
66
67 cd "${S}/src/${EGO_PN}"
68
69 # Build binaries
70 GOPATH="${S}" emake
71
72 use nls && emake build-mo
73 }
74
75 src_test() {
76 # Go native tests should succeed
77 golang-build_src_test
78 }
79
80 src_install() {
81 # Installs all src,pkg to /usr/lib/go-gentoo
82 golang-build_src_install
83
84 cd "${S}"
85
86 dobin bin/fuidshift
87 dobin bin/lxc
88
89 dosbin bin/lxd
90
91 cd "src/${EGO_PN}"
92
93 use image && dobin scripts/lxd-images
94
95 if use nls; then
96 for lingua in ${PLOCALES}; do
97 if use linguas_${lingua}; then
98 domo po/${lingua}.mo
99 fi
100 done
101 fi
102
103 newinitd "${FILESDIR}"/lxd.initd lxd
104 newconfd "${FILESDIR}"/lxd.confd lxd
105
106 systemd_dounit "${FILESDIR}"/lxd.service
107
108 newbashcomp config/bash/lxc.in lxc
109
110 dodoc AUTHORS CONTRIBUTING.md README.md
111
112 docinto specs
113 dodoc specs/*
114 }
115
116 pkg_config() {
117 if brctl show lxcbr0 2>&1 | grep "No such device" >/dev/null; then
118 brctl addbr lxcbr0
119 fi
120 }
121
122 pkg_postinst() {
123 # The control socket will be owned by (and writeable by) this group.
124 enewgroup lxd
125
126 # Ubuntu also defines an lxd user but it appears unused (the daemon
127 # must run as root)
128
129 # precedent: sys-libs/timezone-data
130 pkg_config
131
132 einfo
133 einfo "To interact with the service as a non-root user, add yourself to the"
134 einfo "lxd group. This requires you to log out and log in again."
135 einfo
136 }

  ViewVC Help
Powered by ViewVC 1.1.20