# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils python toolchain-funcs distutils DESCRIPTION="DrQueue is an Open Source render farm managing software. It distributes shell based tasks such as rendering images on a per frame basis." HOMEPAGE="http://www.drqueue.org/" SRC_URI="http://drqueue.org/files/1-Sources_all_platforms/${PN}.${PV}c3.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="X python" RDEPEND="X? ( >=x11-libs/gtk+-2 ) python? ( dev-lang/python ) app-shells/tcsh" DEPEND="${RDEPEND} python? ( dev-lang/swig )" S=${S}c3 pkg_setup() { enewgroup drqueue enewuser drqueue -1 /bin/tcsh /dev/null daemon,drqueue } src_unpack() { unpack ${A} } src_compile() { emake all || die "emake failed" if use X; then emake drqman || die "emake drqman failed" fi if use python; then echo "compiling python bindings" # emake python.build || die "python bindings failed" cd ${S}/python/ distutils_src_compile fi } pkg_preinst() { # stop daemons since script is being updated [ -n "$(pidof drqsd)" -a -x /etc/init.d/drqsd ] && \ /etc/init.d/drqsd stop [ -n "$(pidof drqmd)" -a -x /etc/init.d/drqmd ] && \ /etc/init.d/drqmd stop } src_install() { einfo "${D}" emake -j1 INSTROOT=${D}/usr install || die "install failed" insinto /etc/conf.d newins "${FILESDIR}/${PATCHLEVEL}/conf-drqsd-0.64.2" drqsd newins "${FILESDIR}/${PATCHLEVEL}/conf-drqmd-0.64.2" drqmd insinto /etc/env.d newins "${FILESDIR}/${PATCHLEVEL}/env" 02drqueue exeinto /etc/init.d newexe "${FILESDIR}/${PATCHLEVEL}/init-drqsd-0.64.2" drqsd newexe "${FILESDIR}/${PATCHLEVEL}/init-drqmd-0.64.2" drqmd # create the distccd pid directory dodir /var/run/drqueue keepdir /var/run/drqueue dodir /etc/drqueue mv ${D}/usr/etc/*.[sc]* ${D}/etc/drqueue dodir /usr dodir /usr/share/${PN} mv ${D}usr/logs ${D}usr/share/${PN} mv ${D}usr/contrib ${D}usr/share/${PN} cp ${D}usr/db ${D}/usr/share/${PN} if use python; then cd ${S}/python/ distutils_src_install dodir /usr/share/${PN}/python #mkdir ${D}/usr/share/${PN}/python # Install DRKeewee web service and example python scripts cp -R DrKeewee ${D}/usr/share/${PN}/python cp -R examples ${D}/usr/share/${PN}/python fi } pkg_postinst() { einfo "Edit /etc/conf.d/drqsd /etc/env.d/02drqueue" einfo "and /etc/conf.d/drqmd DRQUEUE_MASTER=\"hostname\"" einfo "to reflect your master's hostname." einfo "" einfo "/etc/drqueue contains further files" einfo "which require configuration, mainly" einfo "master.conf and slave.conf" einfo "DrKeewee is installed with the python" einfo "USE flag and can be found in /usr/share/drqueue/python" }