# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-print/pykota/pykota-1.26.ebuild,v 1.1 2008/10/10 18:26:12 genstef Exp $ S=${WORKDIR}/${PN} inherit python eutils distutils subversion DESCRIPTION="Flexible print quota and accounting package for use with CUPS and lpd." HOMEPAGE="http://www.pykota.com" ESVN_REPO_URI="http://svn.pykota.com/pykota/tags/1.26" LICENSE="GPL-2" RESTRICT="nomirror" # The 'doc' USE flag will create the PyKota html documentation. IUSE="+doc ldap mysql pam postgres reports snmp sqlite xml" SLOT="0" DEPEND=">=dev-lang/python-2.3 dev-python/egenix-mx-base net-print/pkpgcounter dev-python/chardet dev-python/pkipplib reports? ( dev-python/reportlab dev-python/imaging ) ldap? ( dev-python/python-ldap ) mysql? ( dev-python/mysql-python ) postgres? ( dev-db/postgresql dev-db/pygresql ) sqlite? ( >=dev-python/pysqlite-2.0.5 >=dev-db/sqlite-3.2.7 ) snmp? ( net-analyzer/net-snmp >=dev-python/pysnmp-3.4.2 ) xml? ( dev-python/jaxml ) pam? ( dev-python/pypam ) doc? ( app-text/docbook-sgml-utils )" RDEPEND="${DEPEND}" KEYWORDS="~amd64 ~x86" S="${WORKDIR}"/"${P}" src_install() { mkdir -p "${D}"/etc/${PN} python_version distutils_src_install #cups backend ---------------------------------------------- mkdir -p "${D}"$(cups-config --serverbin)/backend dosym /usr/share/pykota/cupspykota $(cups-config --serverbin)/backend/cupspykota init_dir=/usr/share/doc/${P}/initscripts insinto ${init_dir} cp -pPR initscripts/* "${D}"/${init_dir} # Fixes permissions for bug 155865 chmod 700 "${D}"/usr/share/pykota/cupspykota jw -u -o "${D}"/usr/share/doc/"${P}"/html/ ./docs/pykota.sgml cp -r "${FILESDIR}"/images "${D}"/usr/share/doc/"${P}"/html/ sed -i 's/\.\.\/images/images/g' "${D}"/usr/share/doc/"${P}"/html/pykota.html dodoc {CREDITS,FAQ,SECURITY} || die "dodoc failed" mv "${D}"/usr/share/doc/pykota/openoffice "${D}"/usr/share/doc/"${P}" mv "${D}"/usr/share/doc/pykota/qa-assistant "${D}"/usr/share/doc/"${P}" mv "${D}"/usr/share/doc/pykota/pykota-presentation.sxi "${D}"/usr/share/doc/"${P}" rm -rf "${D}"/usr/share/doc/"${PN}"/ } pkg_postinst(){ use pam || einfo "If you want to use pknotify, please add " \ "pam to USE flags" }