# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ S=${WORKDIR}/${P} SLOT="0" LICENSE="BSD" DESCRIPTION=" The AMANDA tape backup client and server" SRC_URI="ftp://ftp.amanda.org/pub/amanda/${P}p2.tar.gz" HOMEPAGE="http://www.amanda.org/" IUSE="zlib" KEYWORDS="x86" DEPEND="" RDEPEND="sys-apps/xinetd" pkg_setup() { echo "Adding amanda user to system." useradd -c "Amanda backup user" -g tape -m amanda echo "Creating /etc/amandates" touch /etc/amandates chown amanda /etc/amandates chgrp tape /etc/amandates } src_compile() { local myconf myconf=" --prefix=/usr \ --infodir=/usr/share/info \ --mandir=/usr/share/man \ --with-user=amanda --with-group=tape --with-tape-device=/dev/nst0 --with-gnutar=/bin/tar --with-mmap --with-fqdn" use samba && myconf="${myconf} --with-smbclient" cd ${S}p2 econf ${myconf} || die "econf FAILED" emake || die "emake FAILED" } src_install() { cd ${S}p2 make DESTDIR=${D} install || die "make install to DESTDIR=${D} FAILED" } pkg_postinst() { if [ -d /etc/xinetd.d/ ] then cp /usr/portage/app-admin/amanda/files/amanda /etc/xinetd.d/ cp /usr/portage/app-admin/amanda/files/amandaidx /etc/xinetd.d/ cp /usr/portage/app-admin/amanda/files/amidxtape /etc/xinetd.d/ else ewarn "NOTE TO ADMINISTRATOR:" ewarn " xinetd stub files for amanda are located in \ /usr/portage/app-admin/amanda/files." fi } pkg_postrm() { userdel amanda rm -f /etc/amandates if [ -d /etc/xinetd.d/ ] then rm -f /etc/xinetd.d/amanda rm -f /etc/xinetd.d/amandaidx rm -f /etc/xinetd.d/amidxtape fi }