# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_PV="10.1.5629.3" RALUS_Q_ID="Q180968" RALUS_DOC_ID="279329" RALUS_FILE="${RALUS_Q_ID}.BE.RALUS.${MY_PV}.tar_${RALUS_DOC_ID}.gz" RALUS_FETCH_URI="http://seer.support.veritas.com/docs/${RALUS_DOC_ID}.htm" PATCH_DOC_ID="282308" PATCH_FILE="ralus5629HF21_${PATCH_DOC_ID}.zip" PATCH_FETCH_URI="http://seer.support.veritas.com/docs/${PATCH_DOC_ID}.htm" VRTSRALUS_FILE="VRTSralus-10.00.5629-0.i386.rpm" VRTSVXMSA_FILE="VRTSvxmsa-4.2.1-211.i386.rpm" LINUX_PATCH_FILE="ralus5629HF21-Linux.tar" LINUX_HOTFIX_FILE="HF21-Linux.tar" DESCRIPTION="Symantec Backup Exec - Remote Agent for Linux or Unix Servers" HOMEPAGE="http://www.veritas.com/" SRC_URI="${RALUS_FILE} ${PATCH_FILE}" LICENSE="VERITAS-EUSLA" SLOT="0" KEYWORDS="~x86" IUSE="" RESTRICT="fetch" DEPEND=">=app-arch/rpm-4.2 >=app-arch/unzip-5.52" RDEPEND=">=sys-libs/lib-compat-1.4" S="${WORKDIR}" pkg_nofetch() { einfo "Please download ${RALUS_FILE} from:" einfo "${RALUS_FETCH_URI}" einfo "and move it to ${DISTDIR}" einfo "" einfo "Please download ${PATCH_FILE} from:" einfo "${PATCH_FETCH_URI}" einfo "and move it to ${DISTDIR}" } src_unpack() { # unpack the package for x in ${VRTSRALUS_FILE} ${VRTSVXMSA_FILE} do einfo "Extracting: ${x}" tar -xzOf "${DISTDIR}/${RALUS_FILE}" "linux/pkgs/linux/${x}" \ | rpm2cpio - | cpio --extract --make-directories --unconditional --quiet done # unpack the hotfix einfo "Extracting: ${LINUX_HOTFIX_FILE}" unzip -pqq "${DISTDIR}/${PATCH_FILE}" "${LINUX_PATCH_FILE}" | tar -xO "${LINUX_HOTFIX_FILE}" | tar -x } src_install() { # install the hotfix files mv ${WORKDIR}/beremote libndmpcomm.so ${WORKDIR}/opt/VRTSralus/bin mv ${WORKDIR}/ralus.ver ${WORKDIR}/var/VRTSralus # install the package files to /etc chmod -R 600 ${WORKDIR}/etc chmod 755 ${WORKDIR}/etc mv ${WORKDIR}/etc ${D} # install the package files to /opt chmod -R 500 ${WORKDIR}/opt chmod 755 ${WORKDIR}/opt mv ${WORKDIR}/opt ${D} # install the package files to /var chmod -R 600 ${WORKDIR}/var chmod 755 ${WORKDIR}/var mv ${WORKDIR}/var ${D} # install the init.d file newinitd ${FILESDIR}/backupexec-ralus.initd backupexec-ralus # install the conf.d file newconfd ${FILESDIR}/backupexec-ralus.confd backupexec-ralus } pkg_preinst() { # add the beoper group enewgroup beoper } pkg_postinst() { einfo "" einfo "You must add a user to the beoper group for the remote agent to function." einfo "The user must have permission to access the files that you wish to backup." einfo "gpasswd -a beoper" einfo "" einfo "By default the remote agent will use port 10000. If this port is already in use," einfo "edit /etc/services and add the ndmp service with a more suitable port." einfo "ndmp /tcp" einfo "" einfo "You must configure /etc/VRTSralus/ralus.cfg before starting the remote agent." einfo "Refer to the Backup Exec Administrator's Guide for configuration options." einfo ${RALUS_FETCH_URI} einfo "" einfo "To start the remote agent, run:" einfo "/etc/init.d/backupexec-ralus start" einfo "" einfo "To have the remote agent start at boot, run:" einfo "rc-update add backupexec-ralus default" einfo "" }