]> Pileus Git - ~andy/sunrise/blob - app-misc/ccpublisher/ccpublisher-2.2.1.ebuild
sunrise/ app-portage/elog-list/elog-list-0.0.6.ebuild: Update header
[~andy/sunrise] / app-misc / ccpublisher / ccpublisher-2.2.1.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="1"
6 WX_GTK_VER="2.6"
7 inherit zproduct python multilib wxwidgets
8
9 MY_PN="ccPublisher"
10 MY_P="${MY_PN}-${PV}"
11
12 DESCRIPTION="Tool to tag and upload CC-licensed media files"
13 HOMEPAGE="http://wiki.creativecommons.org/CcPublisher"
14 SRC_URI="mirror://berlios/cctools/${MY_P}.tar.gz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~x86"
19 IUSE="zope"
20
21 ZPROD_LIST="${MY_PN}"
22 S="${WORKDIR}/${MY_P}"
23
24 DEPEND=""
25 RDEPEND=">=dev-python/wxpython-2.6.3.2:2.6
26         >=x11-libs/wxGTK-2.6.3.3:2.6
27         zope? ( net-zope/zope )
28         || ( ( dev-python/elementtree >=dev-lang/python-2.4 ) >=dev-lang/python-2.5 )"
29
30 src_install() {
31         # change directories, so that the python library is found
32         sed -i "s#\.:#/usr/$(get_libdir)/${P}:# ; s#ccp.py#/usr/$(get_libdir)/${P}/ccp.py#" \
33                 ccPublisher.sh
34
35         newbin ccPublisher.sh ccPublisher
36
37         # docs
38         dodoc README.txt resources/*txt
39
40         # copy python libraries, no not include the script, readme or
41         # zope libraries. zope libs will be installed if USE="zope"
42         rm ccPublisher.sh README.txt -f
43         mv "zope" "${WORKDIR}"
44         insinto /usr/$(get_libdir)/${P}
45         doins -r *
46
47         # optimize python by compiling it
48         python_mod_optimize /usr/$(get_libdir)/${P}
49
50         # copy the zope Product folder
51         if use zope; then
52
53                 einfo "Installing the Zope Product"
54
55                 # we need to reorganize a bit, since the zproduct
56                 # eclass defines S=$WORKDIR
57                 # the zope directory is already in $WORKDIR
58                 rm -rf "${S}/*"
59                 mv "${WORKDIR}/zope" "${S}/${MY_PN}"
60
61                 zproduct_src_install all
62
63         fi
64 }
65
66 pkg_postrm() {
67         python_mod_cleanup /usr/$(get_libdir)/${P}
68 }
69
70 pkg_postinst() {
71         python_version
72         python_mod_optimize "${ROOT}"usr/$(get_libdir)/${P}
73
74         elog
75         elog "ccPublisher is now installed to /usr/bin/ccPublisher"
76         elog
77         elog "If you get python errors, check that both wxpython and"
78         elog "wxGTK are the same version."
79         elog
80
81         if use zope; then
82                 elog "The Zope Product has been installed."
83                 elog "Use \"zprod-manager add\" to activate it."
84                 elog
85         fi
86 }