1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils zproduct python
10 DESCRIPTION="Tool to tag and upload CC-licensed media files"
11 HOMEPAGE="http://wiki.creativecommons.org/CcPublisher"
12 SRC_URI="http://download.berlios.de/cctools/${MY_P}.tar.gz"
20 S="${WORKDIR}/${MY_P}"
23 RDEPEND=">=dev-python/wxpython-2.6.3.2
24 >=x11-libs/wxGTK-2.6.3.3
25 zope? ( net-zope/zope )
26 || ( ( dev-python/elementtree >=dev-lang/python-2.4 ) >=dev-lang/python-2.5 )"
27 # wxGTK and wxpython have to be the same x.y.z version
32 # change directories, so that the python library is found
33 sed -i "s#\.:#/usr/lib/${P}:# ; s#ccp.py#/usr/lib/${P}/ccp.py#" \
36 newbin ccPublisher.sh ccPublisher
39 dodoc README.txt resources/*txt
41 # copy python libraries, no not include the script, readme or
42 # zope libraries. zope libs will be installed if USE="zope"
43 rm ccPublisher.sh README.txt -f
44 mv "zope" "${WORKDIR}"
48 # optimize python by compiling it
49 python_mod_optimize /usr/lib/${P}
51 # copy the zope Product folder
54 einfo "Installing the Zope Product"
56 # we need to reorganize a bit, since the zproduct
57 # eclass defines S=$WORKDIR
58 # the zope directory is already in $WORKDIR
60 mv "${WORKDIR}/zope" "${S}/${MY_PN}"
62 zproduct_src_install all
68 python_mod_cleanup /usr/lib/${P}
73 elog "ccPublisher is now installed to /usr/bin/ccPublisher"
75 elog "If you get python errors, check that both wxpython and"
76 elog "wxGTK are the same version."
79 elog "The Zope Product has been installed."
80 elog "Use \"zprod-manager add\" to activate it."