1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit zproduct python multilib wxwidgets
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"
22 S="${WORKDIR}/${MY_P}"
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 )"
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#" \
35 newbin ccPublisher.sh ccPublisher
38 dodoc README.txt resources/*txt
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}
47 # optimize python by compiling it
48 python_mod_optimize /usr/$(get_libdir)/${P}
50 # copy the zope Product folder
53 einfo "Installing the Zope Product"
55 # we need to reorganize a bit, since the zproduct
56 # eclass defines S=$WORKDIR
57 # the zope directory is already in $WORKDIR
59 mv "${WORKDIR}/zope" "${S}/${MY_PN}"
61 zproduct_src_install all
67 python_mod_cleanup /usr/$(get_libdir)/${P}
72 python_mod_optimize "${ROOT}"usr/$(get_libdir)/${P}
75 elog "ccPublisher is now installed to /usr/bin/ccPublisher"
77 elog "If you get python errors, check that both wxpython and"
78 elog "wxGTK are the same version."
82 elog "The Zope Product has been installed."
83 elog "Use \"zprod-manager add\" to activate it."