# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-text/bibus/bibus-1.4.3.2-r1.ebuild,v 1.2 2010/06/04 20:56:53 arfrever Exp $ EAPI="2" inherit python multilib eutils versionator MY_VERSION=$(get_version_component_range 1-3) DESCRIPTION="Bibliographic and reference management software, integrates with OO.o and MS Word" HOMEPAGE="http://bibus-biblio.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}-biblio/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" IUSE="mysql sqlite" # Most of this mess is designed to give the choice of sqlite or mysql # but prefer sqlite. We also need to default to sqlite if neither is requested. RDEPEND="virtual/ooo =dev-python/wxpython-2.6* sqlite? ( dev-python/pysqlite dev-db/sqliteodbc ) !sqlite? ( mysql? ( dev-python/mysql-python dev-db/myodbc ) !mysql? ( dev-python/pysqlite dev-db/sqliteodbc ) ) dev-db/unixODBC" DEPEND="${RDEPEND}" S="${WORKDIR}/${PN}-${MY_VERSION}" src_prepare() { epatch "${FILESDIR}"/${P}-install.1.patch sed -e "s:gentoo-python:python$(python_get_version):g" \ -i Makefile Setup/Makefile Setup/bibus.cfg Setup/bibus.sh \ || die "Failed to adjust python paths" } src_install() { emake \ DESTDIR="${D}" \ oopath="/usr/$(get_libdir)/openoffice/program" \ prefix='$(DESTDIR)/usr' \ sysconfdir='$(DESTDIR)/etc' \ install || die "emake install failed" emake \ DESTDIR="${D}" \ oopath="/usr/$(get_libdir)/openoffice/program" \ prefix='$(DESTDIR)/usr' \ sysconfdir='$(DESTDIR)/etc' \ install-doc-en || die "emake install failed" } pkg_postinst() { python_mod_optimize $(python_get_sitedir)/bibus } pkg_postrm() { python_mod_cleanup $(python_get_sitedir)/bibus }