# 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} ) PYTHON_REQ_USE="sqlite" 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" IUSE="" # 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}] dev-python/python-dateutil[${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 dev-perl/perl-ldap " # CLI # Note that augeas-1.1.0 is patched to provide static files # and is hence listed as hard dependency! RDEPEND="${RDEPEND} dev-python/cheetah[${PYTHON_USEDEP}] dev-python/python-augeas[${PYTHON_USEDEP}] =app-admin/augeas-1.1.0-r1 " # Wallaced RDEPEND="${RDEPEND} net-libs/libkolab[python] " 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() { # Apply patches for kolab_patch in $(ls ${FILESDIR}/${P}-*.patch) ; do epatch "${kolab_patch}" done # 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 doinitd "${FILESDIR}/init.d/${PV}/kolab-saslauthd" doconfd "${FILESDIR}/conf.d/kolab-saslauthd" doinitd "${FILESDIR}/init.d/${PV}/kolabd" doconfd "${FILESDIR}/conf.d/kolabd" doinitd "${FILESDIR}/init.d/${PV}/kolab-wallaced" doconfd "${FILESDIR}/conf.d/kolab-wallaced" }