# $Id: Portfile,v 1.3 2005/08/14 15:50:36 toby Exp $

PortSystem       1.0
name             xephem
version          3.7
categories       science
maintainers      toby@opendarwin.org
description      interactive astronomical ephemeris program
long_description \
    Xephem is an interactive astronomical ephemeris program for X Windows \
    systems. It computes heliocentric, geocentric and topocentric \
    information for fixed celestial objects and objects in heliocentric \
    and geocentric orbits\; has built-in support for all planet positions\; \
    the moons of Jupiter, Saturn and Earth\; Mars' and Jupiter's central \
    meridian longitude\; Saturn's rings\; and Jupiter's Great Red Spot
homepage         http://www.clearskyinstitute.com/xephem/
platforms        darwin
master_sites     ${homepage}
checksums        md5 30d253d086580895df73d17e47b1a5fa \
                 sha1 ee661358d7c245759de0df031bdd731ed0d136cd
depends_lib      lib:libXm:lesstif
worksrcdir       ${distname}/GUI/xephem
use_configure    no
build.target

destroot {
    set share ${prefix}/share/xephem
    set appdefaults /usr/X11R6/lib/X11/app-defaults
    set bin ${prefix}/bin
    set man1 ${prefix}/man/man1
  
    xinstall -m 755 ${worksrcpath}/xephem ${destroot}${bin}
    
    xinstall -m 755 -d ${destroot}${man1}
    xinstall -m 644 ${worksrcpath}/xephem.man ${destroot}${man1}/xephem.1

    file mkdir ${destroot}${share}
    file copy \
        ${worksrcpath}/auxil \
        ${worksrcpath}/catalogs \
        ${worksrcpath}/fifos \
        ${worksrcpath}/fits \
        ${worksrcpath}/gallery \
        ${worksrcpath}/help \
        ${worksrcpath}/lo \
        ${destroot}${share}

    file mkdir ${destroot}${appdefaults}
    system "echo XEphem.ShareDir: ${share} > ${destroot}${appdefaults}/XEphem"
}
