From 4f1f42ca34ece60a97ec4bf0576e6bb7a60c0199 Mon Sep 17 00:00:00 2001 From: Joshua Sled Date: Sun, 14 May 2006 23:26:35 +0000 Subject: [PATCH] Updated ebuild. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14067 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 4 +++ packaging/gnucash-1.9.x.ebuild | 62 +++++++++++++++++++--------------- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8799aed851..1b8d03ce0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-05-14 Joshua Sled + * packaging/gnucash-1.9.x.ebuild (DEPEND): Cleanups from Ed Catmur + for better Gentoo-iness, doc install, + /usr/bin/gnucash-${version} symlink, .desktop install. + * src/engine/gw-engine-spec.scm: expose gnc:book-get-template-group * src/report/standard-reports/general-journal.scm diff --git a/packaging/gnucash-1.9.x.ebuild b/packaging/gnucash-1.9.x.ebuild index aec749aac0..56f5ee8e78 100644 --- a/packaging/gnucash-1.9.x.ebuild +++ b/packaging/gnucash-1.9.x.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header$ +# $Header: $ # This script should work fine for the whole 1.9.x (and hopefully 2.0.x) # releases with a simple rename. See @@ -18,7 +18,7 @@ inherit eutils gnome2 DESCRIPTION="A personal finance manager (unstable version)." HOMEPAGE="http://www.gnucash.org/" SRC_URI="" -if [ ${PN/-svn/XXX} == ${PN} ]; then +if [[ "${PN}" != *-svn ]]; then SRC_URI="mirror://sourceforge/gnucash/${P}.tar.gz" fi LICENSE="GPL-2" @@ -73,17 +73,18 @@ pkg_setup() { } src_unpack() { - if [ ${PN/-svn/XXX} != ${PN} ]; then + if [[ "${PN}" == *-svn ]]; then svn co http://svn.gnucash.org/repo/gnucash/trunk ${P} cd ${S} ./autogen.sh || die "Cannot autogen." else unpack ${A} + cd ${S} fi } src_compile() { - EXTRA_ECONF="--enable-error-on-warning --enable-compile-warnings" + local myconf_warnings="--enable-error-on-warning --enable-compile-warnings" # We'd like to only define --prefix, but the econf definition seems # to check, but then promptly forget, that we've redefined it. :p @@ -100,54 +101,59 @@ src_compile() { $(use_enable ofx) \ $(use_enable doc doxygen) \ $(use_enable hbci) \ + ${myconf_warnings} \ || die "econf failed" - emake || die "emake failed" + emake -j1 || die "emake failed" } # copied+mods from gnome2.eclass: gnome2_gconf_install() { - if [ -x ${ROOT}/usr/bin/gconftool-2 ] - then + if [[ -x ${GCONFTOOL_BIN} ]]; then + # We are ready to install the GCONF Scheme now unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL - export GCONF_CONFIG_SOURCE=`${ROOT}/usr/bin/gconftool-2 --get-default-source` + export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source) + einfo "Installing GNOME 2 GConf schemas" - grep "obj /opt/${P}/etc/gconf/schemas" ${ROOT}/var/db/pkg/*/${PF}/CONTENTS | sed 's:obj \([^ ]*\) .*:\1:' | while read F; do - if [ -e "${F}" ]; then + + local contents="${ROOT}/var/db/pkg/*/${PN}-${PVR}/CONTENTS" + + for F in $(grep "obj /opt/${P}/etc/gconf/schemas" ${contents} | sed 's:obj \([^ ]*\) .*:\1:' ); do + if [[ -e "${F}" ]]; then # echo "DEBUG::gconf install ${F}" - ${ROOT}/usr/bin/gconftool-2 --makefile-install-rule ${F} 1>/dev/null + ${GCONFTOOL_BIN} --makefile-install-rule ${F} 1>/dev/null fi done + for user in `ps axuwwf | grep "gconfd-2" |grep -v "grep" | awk '{ print $1 }' | uniq`; do einfo "shutting down gconfd-2 for user ${user} to sync gnucash schemas" - echo su ${user} -c "${ROOT}/usr/bin/gconftool-2 --shutdown" - ${ROOT}/bin/su - ${user} -c "${ROOT}usr/bin/gconftool-2 --shutdown" + echo su ${user} -c "${GCONFTOOL_BIN} --shutdown" + ${ROOT}/bin/su - ${user} -c "${GCONFTOOL_BIN} --shutdown" done fi } # copied+mods from gnome2.eclass: gnome2_gconf_uninstall() { - if [ -x ${ROOT}/usr/bin/gconftool-2 ] - then + if [[ -x ${GCONFTOOL_BIN} ]]; then unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL - export GCONF_CONFIG_SOURCE=`${ROOT}/usr/bin/gconftool-2 --get-default-source` + export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source) + einfo "Uninstalling GNOME 2 GConf schemas" - cat ${ROOT}/var/db/pkg/*/${PN}-${PVR}/CONTENTS | grep "obj /opt/${PN}-${PVR}/etc/gconf/schemas" | sed 's:obj \([^ ]*\) .*:\1:' |while read F; do - #echo "DEBUG::gconf install ${F}" - ${ROOT}/usr/bin/gconftool-2 --makefile-uninstall-rule ${F} 1>/dev/null + + local contents="${ROOT}/var/db/pkg/*/${PN}-${PVR}/CONTENTS" + + for F in $(grep "obj /opt/${P}/etc/gconf/schemas" ${contents} | sed 's:obj \([^ ]*\) .*:\1:' ); do + # echo "DEBUG::gconf install ${F}" + ${GCONFTOOL_BIN} --makefile-uninstall-rule ${F} 1>/dev/null done fi } src_install() { - USE_DESTDIR=1 gnome2_src_install || die "gnome2_src_install failed" - - dodoc AUTHORS ChangeLog* DOCUMENTERS HACKING \ - INSTALL LICENSE NEWS TODO README* doc/README* - - # This fails as follows because of the /opt/${P} install.... - # make_desktop_entry /opt/${P}/bin/gnucash "GnuCash ${PV}" /opt/${P}/share/gnucash/pixmaps/appicon.png Office - # /usr/portage/eclass/eutils.eclass: line 903: /var/tmp/portage/gnucash-1.9.2/temp//opt/gnucash-1.9.2/bin/gnucash-gnucash-1.desktop: No such file or directory - # install: cannot stat `/var/tmp/portage/gnucash-1.9.2/temp//opt/gnucash-1.9.2/bin/gnucash-gnucash-1.desktop': No such file or directory + dodoc AUTHORS ChangeLog* DOCUMENTERS HACKING INSTALL LICENSE NEWS TODO README* doc/README* + dodir /usr/bin + dosym /opt/${P}/bin/gnucash /usr/bin/${P} + make_desktop_entry ${P} "GnuCash ${PV}" \ + /opt/${P}/share/gnucash/pixmaps/appicon.png "Office;Finance" }