summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-02-17 18:56:00 +0100
committerMichał Górny <mgorny@gentoo.org>2017-02-17 18:57:37 +0100
commit81fcde7c44f0a1d9bd2bfabc4ad9bab1cb244a69 (patch)
tree12f37577145b291ff4e29b3174a23fbf2a896a3e /net-print
parentnet-wireless/python-wifi: Clean up old version (diff)
downloadgentoo-81fcde7c44f0a1d9bd2bfabc4ad9bab1cb244a69.tar.gz
gentoo-81fcde7c44f0a1d9bd2bfabc4ad9bab1cb244a69.tar.bz2
gentoo-81fcde7c44f0a1d9bd2bfabc4ad9bab1cb244a69.zip
net-print/pykota: distutils-r1, EAPI=6
Diffstat (limited to 'net-print')
-rw-r--r--net-print/pykota/pykota-1.26-r1.ebuild63
-rw-r--r--net-print/pykota/pykota-1.26.ebuild72
2 files changed, 63 insertions, 72 deletions
diff --git a/net-print/pykota/pykota-1.26-r1.ebuild b/net-print/pykota/pykota-1.26-r1.ebuild
new file mode 100644
index 000000000000..e7f3b12d6510
--- /dev/null
+++ b/net-print/pykota/pykota-1.26-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='sqlite?'
+
+inherit distutils-r1
+
+DESCRIPTION="Flexible print quota and accounting package for use with CUPS and lpd"
+HOMEPAGE="http://www.pykota.com"
+SRC_URI="https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ldap mysql postgres snmp sqlite xml"
+
+RDEPEND="
+ dev-python/egenix-mx-base[${PYTHON_USEDEP}]
+ net-print/pkpgcounter[${PYTHON_USEDEP}]
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/pkipplib[${PYTHON_USEDEP}]
+ ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )
+ mysql? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
+ postgres? ( dev-db/postgresql[server] dev-python/pygresql[${PYTHON_USEDEP}] )
+ snmp? ( net-analyzer/net-snmp dev-python/pysnmp[${PYTHON_USEDEP}] )
+ xml? ( dev-python/jaxml[${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}"
+
+python_prepare_all() {
+ sed -i -e 's:from pysqlite2 import dbapi2:import sqlite3:' \
+ pykota/storages/sqlitestorage.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ local DOCS=()
+
+ distutils-r1_python_install_all
+
+ dodir /etc/${PN}
+ # cups backend ----------------------------------------------
+
+ dodir "$(cups-config --serverbin)/backend"
+ dosym "${EPREFIX}"/usr/share/pykota/cupspykota \
+ "$(cups-config --serverbin)/backend/cupspykota"
+
+ # extra docs: inits -----------------------------------------
+
+ init_dir="/usr/share/doc/${PF}/initscripts"
+ insinto "${init_dir}"
+ doins -r initscripts/*
+
+ # Fixes permissions for bug 155865
+ fperms 0700 /usr/share/pykota/cupspykota || die
+
+ rm "${ED%/}"/usr/share/doc/${PN}/{LICENSE,COPYING} || die
+ mv "${ED%/}"/usr/share/doc/{${PN},${PF}} || die
+}
diff --git a/net-print/pykota/pykota-1.26.ebuild b/net-print/pykota/pykota-1.26.ebuild
deleted file mode 100644
index 7b7d5d51e796..000000000000
--- a/net-print/pykota/pykota-1.26.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=3
-PYTHON_DEPEND="2"
-PYTHON_USE_WITH='sqlite?'
-
-inherit distutils
-
-DESCRIPTION="Flexible print quota and accounting package for use with CUPS and lpd"
-HOMEPAGE="http://www.pykota.com"
-SRC_URI="https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="ldap mysql postgres snmp sqlite xml"
-
-DEPEND="dev-lang/python
- dev-python/egenix-mx-base
- net-print/pkpgcounter
- dev-python/chardet
- dev-python/pkipplib
- ldap? ( dev-python/python-ldap )
- mysql? ( dev-python/mysql-python )
- postgres? ( dev-db/postgresql[server] dev-python/pygresql )
- snmp? ( net-analyzer/net-snmp dev-python/pysnmp )
- xml? ( dev-python/jaxml )"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/${P}"
-
-DOCS="README TODO SECURITY CREDITS FAQ"
-
-pkg_setup() {
- python_set_active_version 2
- python_pkg_setup
-}
-
-src_prepare() {
- distutils_src_prepare
-
- sed -i -e 's:from pysqlite2 import dbapi2:import sqlite3:' \
- pykota/storages/sqlitestorage.py || die
-}
-
-src_install() {
- dodir /etc/${PN} || die
- distutils_src_install
-
- # cups backend ----------------------------------------------
-
- dodir $(cups-config --serverbin)/backend || die
- dosym /usr/share/pykota/cupspykota $(cups-config --serverbin)/backend/cupspykota || die
-
- # extra docs: inits -----------------------------------------
-
- init_dir="/usr/share/doc/${PF}/initscripts"
- insinto "${init_dir}"
- doins -r initscripts/* || die
-
- # Fixes permissions for bug 155865
- chmod 700 "${D}"/usr/share/pykota/cupspykota
-
- for doc in ${DOCS}; do
- rm "${D}"/usr/share/doc/${PN}/${doc} || die
- done
- rm "${D}"/usr/share/doc/${PN}/{LICENSE,COPYING} || die
- mv "${D}"/usr/share/doc/${PN}/* "${D}"/usr/share/doc/${PF}/ || die
- rmdir "${D}"/usr/share/doc/${PN} || die
-}