# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-fs/coda/coda-6.0.15.ebuild,v 1.9 2007/07/12 05:38:40 mr_bones_ Exp $ inherit autotools eutils IUSE="coda-client coda-server kerberos" DESCRIPTION="Coda is an advanced networked filesystem developed at Carnegie Mellon Univ." HOMEPAGE="http://www.coda.cs.cmu.edu/" SRC_URI="http://www.coda.cs.cmu.edu/pub/coda/src/${P}.tar.gz" SLOT="0" LICENSE="GPL-2" KEYWORDS="~amd64 ~ppc ~x86" # partly based on the deps suggested by Mandrake's RPM, and/or on my current versions # Also, definely needs coda.h from linux-headers. RDEPEND=">=sys-libs/lwp-2.1 >=net-libs/rpc2-2.0 >=sys-libs/rvm-1.11 >=sys-libs/db-3 >=sys-libs/ncurses-4 >=sys-libs/readline-3 >=dev-lang/perl-5.8 kerberos? ( virtual/krb5 )" DEPEND="${RDEPEND} sys-apps/gawk sys-devel/bison sys-apps/grep virtual/os-headers" src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/${P}-fixdeps.patch" epatch "${FILESDIR}/${P}-netdb.patch" epatch "${FILESDIR}/${P}-gentoo-dirs.patch" epatch "${FILESDIR}/${P}-gentoo-init.patch" } src_compile() { local myflags="" use coda-client && myflags="${myflags} --enable-client" use coda-server && myflags="${myflags} --enable-server" if use kerberos; then myflags="${myflags} --with-crypto" myflags="${myflags} --with-krb5" myflags="${myflags} --with-krb5-includes=/usr/include/krb5" myflags="${myflags} --with-krb5-libs=/usr/lib" fi eaclocal || die "aclocal failed" eautomake || die "automake failed" eautoconf || die "autoconf failed" econf ${myflags} || die "configure failed" emake -j1 || die "emake failed" } src_install () { #these crazy makefiles dont seem to use DESTDIR, but they do use these... # (except infodir, but no harm in leaving it there) # see Makeconf.setup in the package #Also note that for Coda, we need to do "make client-install" for # the client, and "make server-install" for the server. #...you can find out about this from ./configs/Makerules emake DESTDIR="${D}" install || die "Install failed" dodoc INSTALL* README* ChangeLog CREDITS doinitd ${FILESDIR}/${PV}/venus doinitd ${FILESDIR}/coda-update doinitd ${FILESDIR}/codasrv doinitd ${FILESDIR}/auth2 # We may use a conf.d/coda file at some point ? # insinto /etc/conf.d # newins ${FILESDIR}/coda.conf.d coda # Modify coda to conform to gentoo filesystem layout. # TODO # Fix conflict with backup.sh from tar mv -f ${D}/usr/sbin/backup{,-coda}.sh # Add gentoo specific directorys. dodir /var/lib/vice dodir /var/lib/coda dodir /mnt/coda dodir /usr/coda/spool diropts -m0700 dodir /var/lib/coda/venus.cache # Symlink traditional coda dirs to gentoo dirs. dosym ../var/lib/coda /usr/coda dosym var/lib/vice /vice dosym mnt/coda /coda dosym mnt/vicepa /vicepa } pkg_preinst () { enewgroup codaroot enewuser codaroot -1 -1 -1 codaroot } pkg_postinst () { elog elog "To enable the coda server at boot up, please do:" elog " rc-update add auth2 default" elog " rc-update add updatecoda default" elog " rc-update add codasrv default" elog elog "To enable the coda client at boot up, do:" elog " rc-update add venus default" elog elog "To get started, run vice-setup and/or venus-setup." }