# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="DECnet phase IV end-node and routing capabilities on your Linux box" HOMEPAGE="http://linux-decnet.sourceforge.net/" SRC_URI="http://easynews.dl.sourceforge.net/sourceforge/linux-decnet/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="nokerneldnh uselocaldir" DEPEND="virtual/libc >=sys-apps/sed-4.1.5 >=app-arch/tar-1.16.1 >=sys-devel/binutils-2.17 >=sys-devel/make-3.81 >=sys-apps/coreutils-6.9-r1" RDEPEND="${DEPEND}" src_unpack(){ unpack ${A} if use uselocaldir; then epatch ${FILESDIR}/${P}-usrlocal.patch || die "patch failed" fi if use nokerneldnh; then epatch ${FILESDIR}/${P}-nokerneldnh.patch || die "patch failed" fi cp ${FILESDIR}/dnetconf ${S}/scripts/ cp ${FILESDIR}/dnetd ${S}/scripts/ epatch ${FILESDIR}/${P}-linuxconf.patch || die "patch failed" } src_compile() { # make depend doesn't work right now:FIXME # emake -j1 dep || die "make depend failed" emake -j1 || \ if use nokerneldnh; then die "make failed" else einfo "Do you need to use scottspatch? Add USE=nokerneldnh before the emerge command" && die "make failed" fi } src_install(){ if use uselocaldir; then elog "Installing in local dir" else elog "Not installing in local dir. If you would like to install in local dir then add USE=uselocaldir before the emerge command" fi make DESTDIR=${D} install || die "make DESTDIR=${D} install failed" fperms 644 /etc/conf.d/dnetd fperms 755 /etc/init.d/dnetd } pkg_postinst(){ elog "NOTE: Whenever the startup script /etc/init.d/dnetd is called it must be run before the TCP/IP initialisation because it needs to set the MAC address of the ethernet card. Right now /etc/init.d/dnetd might not run at the right time during your startup. Instead of adding dnetd to the default runlevel, you might want to add to your /etc/conf.d/local.start. To read an example please read the information in /etc/conf.d/dnetd. You will also now have an example configuration file (called /etc/decnet.conf.sample). You should copy this to /etc/decnet.conf and edit it to contain the details for your Linux machine (the executor) and all DECnet nodes with which you want to communicate - see the man page for more details. You may also want to configure a DECnet proxies file. See the FAL documentation and the decnet.proxy(5) man page for more information." }