# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # this module is for pulling in ROX CVS. # as this IS CVS, it is "use at your own risk!" # and this ebuild is appropriately marked -* ECVS_SERVER="cvs.sourceforge.net:/cvsroot/rox" ECVS_MODULE="rox" inherit cvs eutils DESCRIPTION="ROX is a desktop environment and filer based on RISC OS." HOMEPAGE="http://rox.sourceforge.net/" # mark all as testing LICENSE="GPL-2" SLOT="0" KEYWORDS="-*" DEPEND=">=x11-libs/gtk+-2.4 >=dev-libs/libxml2-2.4.23 >=x11-misc/shared-mime-info-0.14 svg? ( gnome-base/librsvg ) >=docbook-xsl-stylesheets-1.65" # need docbook to compile manuals IUSE="svg" ROXAPPDIR="/usr/lib/rox" CHOICESDIR="/etc/xdg/" MIMEDIR="/usr/share/mime" S=${WORKDIR}/rox src_compile() { cd ${WORKDIR}/${PN}/ROX-Filer # remove configure just in case rm -f src/configure >/dev/null 2>&1 ./AppRun --compile || die "Cannot make ROX. Sorry :(" # clean up ( cd src ; make clean >/dev/null 2>&1 ) # we don't need this dir rm -fr build # make Docs - not incl in cvs. # first, extract current xsl directory tree from /etc/xml/docbook FILE=/etc/xml/docbook dont_make_doc=0 if [ -r ${FILE} ] ; then OUTP=`grep "file:///.*" -m 1 -o ${FILE} | sed -e s/\".*//` if [ $? -gt 0 ] ; then dont_make_doc=1 fi else dont_make_doc=1 fi if [ ${dont_make_doc} -eq 1 ] ; then ewarn "Problem with /etc/xml/docbook file not found. Won't compile documentation" else ( cd src/Docs # sed proper location for docbooks.xsl into Style Sheet sed -ine "s%/usr/share/.*%${OUTP}/xhtml/docbook.xsl\"\/\>%" to_html.xsl if [ $? -eq 0 ] ; then make else ewarn "There was a problem updating the \"to_html.xsl\" Style Sheet." ewarn "Documentation files won't be compiled. Sorry :(" fi ) fi # now do translations which also aren't in CVS einfo "Making Translations..." ( cd src/po ./dist >/dev/null 2>&1 ) } src_install() { doman rox.1 newdoc README README-CVS ( cd ROX-Filer/Help dodoc Changes COPYING README* TODO ) dodir ${ROXAPPDIR} cp -rf ROX-Filer/ ${D}/${ROXAPPDIR} dodir /usr/bin cat > "${D}/usr/bin/rox" << EOF #!/bin/sh exec ${ROXAPPDIR}/ROX-Filer/AppRun "\$@" EOF chmod 0755 ${D}/usr/bin/rox insinto ${MIMEDIR}/packages doins rox.xml # ROX Now uses the freedesktop standard xdg. # This means the old Choices/AppDir system has been # updated with a .desktop model. # insinto ${CHOICESDIR}/rox.sourceforge.net/MIME-types doins Choices/MIME-types/* } pkg_preinst() { # clean out any CVS dirs and build dir cd ${D} find . -name 'CVS' | xargs rm -fr >/dev/null 2>&1 find . -name '.cvsignore' | xargs rm -f >/dev/null 2>&1 } pkg_postinst() { update-mime-database ${MIMEDIR} ebeep 3 einfo "${P} has been installed to ${ROXAPPDIR}. It can be started" einfo "by typing \"rox\" at the command prompt inside a WM." echo einfo "NOTE! THIS IS A CVS BUILD AND MAY CONTAIN BUGS OR NOT WORK!" einfo "You have been warned!" epause 5 }