58de1936d2ca50bd2c17651721622b7c5426d4c7
[wtk-overlay.git] / dev-util / be / be-9999.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6 PYTHON_DEPEND="*:2.6"
7 SUPPORT_PYTHON_ABIS="1"
8
9 inherit eutils distutils
10
11 if [[ ${PV} == "9999" ]] ; then
12         inherit git
13         EGIT_BRANCH="master"
14         EGIT_REPO_URI="git://gitorious.org/be/be.git"
15         SRC_URI=""
16 else
17         SRC_URI="http://bugseverywhere.org/${PN}/${P}.tar.gz"
18 fi
19
20 DESCRIPTION="Bugs Everywere distributed bug tracker"
21 HOMEPAGE="http://bugseverywhere.org/"
22
23 LICENSE="GPL-2"
24 SLOT="0"
25 KEYWORDS="~amd64 ~x86"
26 IUSE=""
27
28 RDEPEND="dev-lang/python
29         dev-python/pyyaml"
30 DEPEND="${RDEPEND}
31         dev-vcs/bzr
32         app-text/docbook-sgml-utils"
33
34 src_unpack() {
35         if [[ ${PV} == "9999" ]] ; then
36                 git_src_unpack
37         else
38                 unpack ${A}
39         fi
40         cd "${S}"
41 }
42
43 src_prepare() {
44         epatch "${FILESDIR}/${P}"-install-dir.patch
45         epatch "${FILESDIR}/${P}"-docbook2man.patch
46         distutils_src_prepare
47 }
48
49 src_compile() {
50         make libbe/_version.py || die "_version.py generation failed"
51         make doc/man/be.1 || die "be.1 generation failed"
52         distutils_src_compile
53 }
54
55 src_install() {
56         distutils_src_install
57         dodoc AUTHORS NEWS README || die "dodoc failed"
58         if [[ ${PV} != "9999" ]] ; then
59                 dodoc ChangeLog || die "dodoc failed"
60         fi
61 }
62
63 pkg_postinst() {
64         python_mod_optimize lib${PN}
65         python_mod_optimize ${PN}commands
66 }
67
68 pkg_postrm() {
69         python_mod_cleanup lib${PN}
70         python_mod_cleanup ${PN}commands
71 }