# Copyright 2006 Mikael Lammentausta # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils zproduct DESCRIPTION="Tool to tag and upload CC-licensed media files" HOMEPAGE="http://wiki.creativecommons.org/CcPublisher" SRC_URI="http://download.berlios.de/cctools/ccPublisher-2.2.1.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64 ~x86-fbsd" IUSE="zope" ZPROD_LIST="ccPublisher" ZP_DIR="${ROOT}/usr/share/zproduct" ZP_DIR2="${ROOT}/var/lib/zope/zope/Products" DEPEND=">=dev-lang/python-2.4 >=dev-python/wxpython-2.6.3.2 >=x11-libs/wxGTK-2.6.3.3 sys-apps/sed zope? (net-zope/zope) dev-python/elementtree" #elementtree is not required for # python 2.5 or later RDEPEND="${DEPEND}" src_unpack() { unpack ${A} } # no compiling required # src_compile() {} src_install() { mkdir -p ${D}/usr/bin # D is like a virtual / (root) # where we install our stuff # before emerge merge it with the real / mkdir -p ${D}/usr/lib/${P} S="${WORKDIR}/${P}" # changing directories, so that the python library is found sed "s#\.:#/usr/lib/${P}:# ; s#ccp.py#/usr/lib/${P}/ccp.py#" \ ${S}/ccPublisher.sh > ${D}/usr/bin/ccPublisher # set proper permissions chmod 755 ${D}/usr/bin/ccPublisher # copying python libraries #rm ${S}/ccPublisher.sh -f cp ${S}/* -r ${D}/usr/lib/${P} # copying the zope Product folder if use zope; then # zproduct dir mkdir -p "${D}/${ZP_DIR}" # the real location is in zproducts cp ${S}/zope -r "${D}/${ZP_DIR}/${PN}" # link to zope Products, breaks Plone sites #ln -s "${ZP_DIR}/${PN}" "${D}/${ZP_DIR2}" fi # docs dodoc ${S}/README.txt dodoc ${S}/resources/*txt } pkg_postinst() { einfo einfo "ccPublisher is now installed to /usr/bin/ccPublisher" einfo einfo "If you get python errors, check that both wxpython and" einfo "wxGTK are the same version." einfo if use zope; then einfo "The Zope Product has been installed to $ZP_DIR." einfo "Please note that the Zope feature of this _ebuild_" einfo "is experimental and probably will not work properly." einfo fi }