# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit distutils eutils MY_P=Pootle-${PV} DESCRIPTION="Web based translation management system" HOMEPAGE="http://translate.sourceforge.net" SRC_URI="mirror://sourceforge/translate/${MY_P}.tar.bz2" S="${WORKDIR}/${MY_P}" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="memcache mysql postgres +sqlite zip" EAPI="2" RDEPEND="|| ( >=dev-lang/python-2.5[sqlite] >=dev-python/pysqlite-2 ) >=dev-python/django-1.0 >=app-i18n/translate-toolkit-1.5.0 >=dev-python/lxml-2.1.4 >=dev-libs/xapian-1.0.13 dev-python/python-levenshtein app-text/iso-codes memcache? ( dev-python/python-memcached ) zip? ( app-arch/zip ) mysql? ( dev-python/django[mysql] ) postgres? ( dev-python/django[postgres] ) sqlite? ( dev-python/django[sqlite] )" # dev-python/pylucene is not in tree yet pkg_setup() { enewgroup pootle enewuser pootle -1 -1 /dev/null pootle } src_install() { newinitd "${FILESDIR}/init" pootle newconfd "${FILESDIR}/conf" pootle DOCS="${DOCS} INSTALL" distutils_src_install mv "${D}"/usr/share/doc/pootle/wsgi.py "${D}"/usr/share/doc/"${P}" rm -Rf "${D}"/usr/share/doc/pootle rm -Rf "${D}"/usr/share/doc/"${P}"/MANIFEST.* keepdir /var/run/pootle fowners -R pootle:pootle /var/lib/pootle fowners -R pootle:pootle /etc/pootle fperms 660 /etc/pootle/localsettings.py } pkg_postinst() { distutils_pkg_postinst einfo "To use memcache functionality, setup net-misc/memcached daemon." }