# Copyright 2015 awesome information technology, http://awesome-it.de # Distributed under the terms of the GNU General Public License v3 # $Header: $ EAPI=5 PYTHON_COMPAT=( python{2_5,2_6,2_7} ) inherit git-2 autotools eutils python-single-r1 user EGIT_REPO_URI="https://gitlab.awesome-it.de/kolab/${PN}.git" [[ ${PV} == "9999" ]] && EGIT_COMMIT="gentoo" || EGIT_COMMIT="${P}-gentoo" DESCRIPTION="Kolab Python Utilities" HOMEPAGE="http://www.kolab.org" LICENSE="GPLv3+" SLOT="0" KEYWORDS="~amd64" # For convencience, I added USE-flags for each corresponding # package containing stuff from pykolab. Some of them might not # be used at all. IUSE="+cli +config +imap +postfix +saslauth +server +wallace" # TODO: # - Add ${PYTHON_USEDEP} to dev-python/pyasn1-modules as soon as they inherit distutils-r1. RDEPEND=" ${PYTHON_DEPS} dev-python/icalendar[${PYTHON_USEDEP}] dev-python/nose[${PYTHON_USEDEP}] >=dev-python/python-ldap-2.4[${PYTHON_USEDEP}] dev-python/pyasn1[${PYTHON_USEDEP}] dev-python/pyasn1-modules dev-python/sqlalchemy[${PYTHON_USEDEP}] dev-python/mysql-python[${PYTHON_USEDEP}] dev-python/pytz[${PYTHON_USEDEP}] sys-devel/autoconf sys-devel/automake app-misc/fdupes sys-devel/gcc sys-devel/gettext sys-libs/glibc dev-util/intltool sys-apps/gawk dev-libs/libcroco dev-libs/expat dev-libs/glib dev-libs/libpcre dev-libs/openssl dev-libs/libunistring dev-perl/XML-Parser dev-libs/libxml2 cli? ( dev-python/cheetah[${PYTHON_USEDEP}] dev-python/python-augeas[${PYTHON_USEDEP}] =app-admin/augeas-1.1.0-r1 ) wallace? ( net-libs/libkolab[python] )" # Note that augeas-1.1.0 is patched to fit Kolab's needs # and is hence listed as hard dependency! DEPEND="${RDEPEND}" pkg_setup() { enewgroup kolab enewuser kolab -1 -1 -1 kolab enewuser kolab-n -1 -1 -1 kolab enewuser kolab-r -1 -1 -1 kolab enewuser cyrus_admin -1 -1 -1 kolab } src_unpack() { git-2_src_unpack cd ${S} #epatch "${FILESDIR}/..." } src_prepare() { # There is no way to disable components depending # on the enabled USE-flags. #econf --localstatedir=/var eautoreconf } src_configure() { econf --localstatedir=/var } src_install() { emake DESTDIR="${D}" install || die # Remove var/run stuff since our init scripts are using the new /run system. rmdir ${D}/var/run/{kolabd,wallaced,kolab-saslauthd} chown kolab:kolab ${D}/var/log/kolab chown kolab:kolab ${D}/var/lib/kolab chown kolab:kolab ${D}/var/spool/pykolab #if use cli ; then #fi #if ! use config ; then #fi #if use postfix ; then #fi if use saslauth ; then doinitd "${FILESDIR}/init.d/kolab-saslauthd" doconfd "${FILESDIR}/conf.d/kolab-saslauthd" fi if use server ; then doinitd "${FILESDIR}/init.d/kolabd" doconfd "${FILESDIR}/conf.d/kolabd" fi if use wallace ; then doinitd "${FILESDIR}/init.d/kolab-wallaced" doconfd "${FILESDIR}/conf.d/kolab-wallaced" fi }