1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils zproduct python
8 DESCRIPTION="Tool to tag and upload CC-licensed media files"
9 HOMEPAGE="http://wiki.creativecommons.org/CcPublisher"
10 SRC_URI="http://download.berlios.de/cctools/${MY_PN}-${PV}.tar.gz"
18 S="${WORKDIR}/${MY_PN}-${PV}"
21 RDEPEND=">=dev-lang/python-2.4
22 >=dev-python/wxpython-2.6.3.2
23 >=x11-libs/wxGTK-2.6.3.3
24 zope? ( net-zope/zope )
25 || ( dev-python/elementtree >=dev-lang/python-2.5 )"
26 # wxGTK and wxpython have to be the same x.y.z version
31 # change directories, so that the python library is found
32 sed -i "s#\.:#/usr/lib/${P}:# ; s#ccp.py#/usr/lib/${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}"
47 # optimize python by compiling it
48 python_mod_optimize /usr/lib/${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/lib/${P}
72 elog "ccPublisher is now installed to /usr/bin/ccPublisher"
74 elog "If you get python errors, check that both wxpython and"
75 elog "wxGTK are the same version."
78 elog "The Zope Product has been installed."
79 elog "Use \"zprod-manager add\" to activate it."