# Copyright 1999-2005 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils perl-module MYP=${P/perl-kolab/perl-kolab-gentoo} DESCRIPTION="Perl modules for the Kolab group server" HOMEPAGE="http://www.kolab.org" SRC_URI="http://www.gunnarwrobel.de/downloads/${MYP}.tar.bz2" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86" IUSE="" DEPEND="" RDEPEND="perl-core/DB_File >=net-mail/cyrus-imap-admin-2.2.12 dev-perl/perl-ldap dev-perl/MIME-tools dev-perl/MIME-Lite dev-perl/Mail-IMAPClient dev-perl/URI" S=${WORKDIR} src_unpack() { unpack ${A} && cd "${S}" ## Patching the code for gentoo cd Kolab epatch ${FILESDIR}/Kolab-1.27-generic.patch epatch ${FILESDIR}/Kolab-1.27-gentoo.patch cd .. cd Kolab-Conf epatch ${FILESDIR}/Kolab-Conf-1.58-generic.patch epatch ${FILESDIR}/Kolab-Conf-1.58-metaconf.patch cd .. cd Kolab-Mailer epatch ${FILESDIR}/Kolab-Mailer-1.3-gentoo-fix.patch cd .. } src_compile() { perlinfo local myconf myconf="${myconf} --prefix=/" myconf="${myconf} --sysconfdir=/etc" myconf="${myconf} --sbindir=/usr/sbin" myconf="${myconf} --bindir=/usr/bin" myconf="${myconf} --includedir=${VENDOR_LIB}" myconf="${myconf} --localstatedir=/var" myconf="${myconf} --libdir=/usr/lib" myconf="${myconf} --dist=gentoo" econf ${myconf} || die emake || die } src_install() { ############################################################# # Create the special kolab users and their groups # The kolab groups will have the same name as the kolab users local musr="kolab" local rusr="kolab-r" local nusr="kolab-n" local kolabusers="${musr}:kolab-management-account ${rusr}:kolab-restricted-account ${nusr}:kolab-non-priviledged-account" for user in ${kolabusers} do enewgroup ${user/:*/} enewuser ${user/:*/} -1 /bin/bash / kolab "-cadded by portage for kolab [${user/*:/}]" done local muid=`id ${musr} -u` local ruid=`id ${rusr} -u` local nuid=`id ${nusr} -u` local mgid=`id ${musr} -g` local rgid=`id ${rusr} -g` local ngid=`id ${nusr} -g` ############################################################# # Install perl source code make install DESTDIR=${D} || die }