]> Pileus Git - ~andy/sunrise/blobdiff - app-misc/ccpublisher/ccpublisher-2.2.1.ebuild
app-admin/ajenti: whitespace. Drop || die because of EAPI4
[~andy/sunrise] / app-misc / ccpublisher / ccpublisher-2.2.1.ebuild
index 8efa6415b05619db11995cf7108271303e431d01..ae95257c79ba9bd114ce2abc57bfda63ff60eb47 100644 (file)
@@ -1,13 +1,17 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-inherit eutils zproduct python
+EAPI="1"
+WX_GTK_VER="2.6"
+inherit zproduct python multilib wxwidgets
 
 MY_PN="ccPublisher"
+MY_P="${MY_PN}-${PV}"
+
 DESCRIPTION="Tool to tag and upload CC-licensed media files"
 HOMEPAGE="http://wiki.creativecommons.org/CcPublisher"
-SRC_URI="http://download.berlios.de/cctools/${MY_PN}-${PV}.tar.gz"
+SRC_URI="mirror://berlios/cctools/${MY_P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -15,21 +19,17 @@ KEYWORDS="~x86"
 IUSE="zope"
 
 ZPROD_LIST="${MY_PN}"
-S="${WORKDIR}/${MY_PN}-${PV}"
+S="${WORKDIR}/${MY_P}"
 
 DEPEND=""
-RDEPEND=">=dev-lang/python-2.4
-       >=dev-python/wxpython-2.6.3.2
-       >=x11-libs/wxGTK-2.6.3.3
+RDEPEND=">=dev-python/wxpython-2.6.3.2:2.6
+       >=x11-libs/wxGTK-2.6.3.3:2.6
        zope? ( net-zope/zope )
-       || ( dev-python/elementtree >=dev-lang/python-2.5 )"
-       # wxGTK and wxpython have to be the same x.y.z version
+       || ( ( dev-python/elementtree >=dev-lang/python-2.4 ) >=dev-lang/python-2.5 )"
 
 src_install() {
-       cd "${S}"
-
        # change directories, so that the python library is found
-       sed -i "s#\.:#/usr/lib/${P}:# ; s#ccp.py#/usr/lib/${P}/ccp.py#" \
+       sed -i "s#\.:#/usr/$(get_libdir)/${P}:# ; s#ccp.py#/usr/$(get_libdir)/${P}/ccp.py#" \
                ccPublisher.sh
 
        newbin ccPublisher.sh ccPublisher
@@ -41,11 +41,11 @@ src_install() {
        # zope libraries. zope libs will be installed if USE="zope"
        rm ccPublisher.sh README.txt -f
        mv "zope" "${WORKDIR}"
-       insinto /usr/lib/${P}
+       insinto /usr/$(get_libdir)/${P}
        doins -r *
 
        # optimize python by compiling it
-       python_mod_optimize /usr/lib/${P}
+       python_mod_optimize /usr/$(get_libdir)/${P}
 
        # copy the zope Product folder
        if use zope; then
@@ -64,16 +64,20 @@ src_install() {
 }
 
 pkg_postrm() {
-       python_mod_cleanup /usr/lib/${P}
+       python_mod_cleanup /usr/$(get_libdir)/${P}
 }
 
 pkg_postinst() {
+       python_version
+       python_mod_optimize "${ROOT}"usr/$(get_libdir)/${P}
+
        elog
        elog "ccPublisher is now installed to /usr/bin/ccPublisher"
        elog
        elog "If you get python errors, check that both wxpython and"
        elog "wxGTK are the same version."
        elog
+
        if use zope; then
                elog "The Zope Product has been installed."
                elog "Use \"zprod-manager add\" to activate it."