# Distributed under the terms of the GNU General Public License v2 # $Header: # /usr/local/portage/app-backup/lgtoclnt-bin/lgtoclnt-lgtoclnt-bin-7.3.1-r1.ebuild,v 0.9 # 2007/02/20 11:58:12 pkn Exp $ # 2006-12-05 Created by peter.kallden@ub.oru.se # 2007-02-20 Modified by abarker@callutheran.edu inherit rpm DESCRIPTION="Legato's NetWorker client is a set of programs that manage automated backups to and directed retrievals from Legato NetWorker server across the network. If you got problems with this ebuild contact me at peter.kallden@ub.oru.se." HOMEPAGE="http://www.legato.com" #SRC_URI="lgtoclnt-7.0-1.i686.rpm" SRC_URI="lgtoclnt-7.3-1.i686.rpm" LICENSE="commersial" SLOT="0" IUSE="" KEYWORDS="-* ~amd64 ~x86" RESTRICT="fetch nostrip" #I dont see why we would need the xorg crap #DEPEND="x11-libs/libXext # x11-base/xorg-server # app-arch/rpm2targz" DEPEND="" RDEPEND="${DEPEND}" pkg_nofetch() { einfo "Please get the ${SRC_URI} from upstreams or ${HOMEPAGE}" einfo "and place the file in ${DISTDIR}" } src_unpack() { #mkdir "${S}" #cd "${S}" rpm_unpack ${A} } src_install() { local dirs="usr/bin usr/sbin usr/lib" # dodir /opt/nsr-${PVR} dodir /usr for i in $dirs; do dodir $i #cp -pPR "${S}/$i" "${D}/opt/nsr-${PVR}/" || die "failed to copy" cp -pPR "${S}/$i" "${D}/$i" || die "failed to copy" done dodir /nsr local dirs="applogs cores cores/nsrexecd index lic lic/res logs mm rap res tmp tmp/sec" for i in $dirs; do dodir /nsr/$i done chmod 700 ${D}/nsr/cores chmod 1777 ${D}/nsr/applogs dodir /etc dodir /etc/init.d cp -pPR "${FILESDIR}/networker.rc" "${D}/etc/init.d/networker" || die "failed to install init script" chmod 755 ${D}/etc/init.d/networker local res_files="nsrla.res servers" for i in $res_files; do if [ ! -z "${D}/nsr/res/$i" ]; then cp -pPR "${FILESDIR}/$i" "${D}/nsr/res" || die "failed to install $i into ${D}/nsr/res" fi done } pkg_postinst() { einfo "" einfo "you need to edit /nsr/res/servers and /nsr/res/nsrla.res" einfo "" einfo "add the backup servers ip address to /etc/hosts" einfo "nano -w /etc/hosts" einfo "000.000.000.000 backup.domain.name backup" einfo "" einfo "start the networker-client: /etc/init.d/networker start" einfo "check that it is running:" einfo "netstat -taupen | grep nsr" einfo "" einfo "tcp 0 0 0.0.0.0:7937 0.0.0.0:* LISTEN 0 458787 13903/nsrexecd" einfo "tcp 0 0 0.0.0.0:7938 0.0.0.0:* LISTEN 0 458777 13901/nsrexecd" einfo "udp 0 0 0.0.0.0:7938 0.0.0.0:* 0 458776 13901/nsrexecd" einfo "" einfo "add the networker-client startup on boot" einfo "rc-update add networker default" einfo "" }