Portfile

# $Id: Portfile 23148 2007-03-26 17:51:37Z mas@macports.org $

PortSystem 1.0
name gnucash-docs
version 2.0.1
revision 0
categories gnome x11
maintainers mas@seligma.com
description docs for gnucash
long_description GnuCash is a personal and small-business \
financial-accounting software, freely licensed under the \
GNU GPL. Designed to be easy to use, yet powerful and \
flexible, GnuCash allows you to track bank accounts, \
stocks, income and expenses. As quick and intuitive to \
use as a checkbook register, it is based on professional \
accounting principles to ensure balanced books and \
accurate reports. \
This package contains (1) the user manual and (2) the \
Tutorial And Concepts Guide. Both are available through \
yelp, the gnome help browser, and an HTML copy is \
installed in ${prefix}/share/doc/gnucash \
(where ${prefix} is usually /opt/local).
homepage http://www.gnucash.org/
master_sites http://www.gnucash.org/pub/gnucash/sources/stable/
checksums md5 c95256826fb7bc8410c789d855045855
# gpg signature verified
depends_lib bin:scrollkeeper-config:scrollkeeper \
port:libxml2 \
bin:xsltproc:libxslt
depends_run bin:yelp:yelp

build.target all html

destroot {
system "cd ${worksrcpath}; ${build.cmd} install prefix=${destroot}${prefix}"

# Install HTML copies
# Duplicate figures are removed, using symlinks instead.
# If you update this, please check for additional localizations!

file mkdir ${destpath}/${prefix}/share/doc/gnucash/C
file mkdir ${destpath}/${prefix}/share/doc/gnucash/de_DE

file copy ${portpath}/${filesdir}/index.html ${destpath}/${prefix}/share/doc/gnucash

file copy ${worksrcpath}/guide/C/gnucash-guide ${destpath}/${prefix}/share/doc/gnucash/C
system "rm -rf ${destpath}/${prefix}/share/doc/gnucash/C/gnucash-guide/figures"
system "ln -sf ${prefix}/share/gnome/help/gnucash/C/figures ${destpath}/${prefix}/share/doc/gnucash/C/gnucash-guide/figures"

file copy ${worksrcpath}/help/C/gnucash-help ${destpath}/${prefix}/share/doc/gnucash/C
system "rm -rf ${destpath}/${prefix}/share/doc/gnucash/C/gnucash-help/figures"
system "ln -sf ${prefix}/share/gnome/help/gnucash/C/figures ${destpath}/${prefix}/share/doc/gnucash/C/gnucash-help/figures"

file copy ${worksrcpath}/help/de_DE/gnucash-help ${destpath}/${prefix}/share/doc/gnucash/de_DE
file delete -force ${destpath}/${prefix}/share/doc/gnucash/de_DE/gnucash-help/figures
system "ln -sf ${prefix}/share/gnome/help/gnucash/de_DE/figures ${destpath}/${prefix}/share/doc/gnucash/de_DE/gnucash-help/figures"
}

files