# 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/" S=${WORKDIR}/rox src_compile() { # If the env variable PLATFORM is set, rox will build using that # string. This causes issues as while the package will compile fine, # it will try to rebuild it the first time rox is run because it will # not be able to find a proper executable to run. use sparc && unset PLATFORM 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 ) # 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 mv README README-CVS dodoc 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 /usr/share/mime/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. # dodir ${CHOICESDIR}/rox.sourceforge.net/MIME-types cp Choices/MIME-types/* ${D}/${CHOICESDIR}/rox.sourceforge.net/MIME-types # no more mime-icons here since rox is xdg aware now #dodir /usr/share/Choices/Mime-icons #keepdir /usr/share/Choices/Mime-icons #dodir /usr/share/icons #dosym ${ROXAPPDIR}/ROX-Filer/ROX /usr/share/icons/ROX } 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 cd ${D}/${ROXAPPDIR}/ROX-Filer rm -fr build } pkg_postinst() { update-mime-database /usr/share/mime ebeep 3 einfo "ROX has been installed to ${ROXAPPDIR}. It can be started" einfo "by typing \"rox\" at the command prompt." echo einfo "NOTE! THIS IS A CVS BUILD AND MAY CONTAIN BUGS OR NOT WORK!" einfo "You have been warned!" epause 5 }