# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit autotools eutils DESCRIPTION="EPICS is a set of Open Source software tools, libraries and applications developed collaboratively and used worldwide to create distributed soft real-time control systems for scientific instruments such as a particle accelerators, telescopes and other large scientific experiments." HOMEPAGE="http://www.aps.anl.gov/epics/" SRC_URI="http://www.aps.anl.gov/epics/download/base/baseR${PVR}.tar.gz" LICENSE="EPICS" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" DEPEND="dev-lang/perl " RDEPEND="${DEPEND}" S=${WORKDIR}/base-${PVR} INSTLOC="/usr/epics" src_compile () { sed --in-place "s:#INSTALL_LOCATION=:INSTALL_LOCATION=${INSTLOC}:g" ${S}/configure/CONFIG_SITE } src_install () { export EPICS_HOST_ARCH=$(${S}/startup/EpicsHostArch) make \ INSTALL_LOCATION=${D}${INSTLOC} \ || die "install problem" cp ${S}/startup/EpicsHostArch ${D}${INSTLOC}/bin/${EPICS_HOST_ARCH} insinto /etc/env.d echo "PATH=\"${INSTLOC}/bin/${EPICS_HOST_ARCH}\"" >> ${D}/etc/env.d/90epics echo "LDPATH=\"${INSTLOC}/lib/${EPICS_HOST_ARCH}\"" >> ${D}/etc/env.d/90epics echo "EPICS_BASE=\"${INSTLOC}" >> ${D}/etc/env.d/90epics echo "EPICS_HOST_ARCH=$(${S}/startup/EpicsHostArch)" >> ${D}/etc/env.d/90epics } pkg_preinst () { enewgroup epics chown --recursive root:epics ${D}/usr/epics }