# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem                  1.0
PortGroup                   app 1.0

name                        Drizzle
version                     30
categories                  devel
platforms                   darwin
maintainers                 ryandesign
license                     GPL-3+
supported_archs             noarch

description                 tools related to the Myst game franchise

long_description            ${name} is a collection of ${description}. \
                            Most notably, it can transform MOUL / Myst 5 / \
                            Crowthistle datafiles into POTS datafiles. \
                            It also allows you to download and install all \
                            the fan-created ages.

homepage                    http://dusty.homeunix.net/wiki/Drizzle
master_sites                sourceforge:drizzle
distname                    ${name}${version}
extract.suffix              .jar
extract.only

checksums                   rmd160  d343759590a826344f44d3999fed990e12cb380a \
                            sha256  32ce0e9bceea7cf55c6a381a10b3942e5f3904f7aa08ea6735c1413386ef4667

extract.mkdir               yes

post-extract {
    copy ${distpath}/${distfiles} ${worksrcpath}
    copy ${filespath}/drizzle.in ${worksrcpath}/drizzle
    copy ${filespath}/drizzleapp.in ${worksrcpath}/drizzleapp
}

use_configure               no

build {
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/drizzle ${worksrcpath}/drizzleapp
}

destroot {
    set javadir ${destroot}${prefix}/share/java/
    xinstall -d ${javadir}
    xinstall ${worksrcpath}/${distfiles} ${javadir}drizzle.jar
    
    xinstall ${worksrcpath}/drizzle ${destroot}${prefix}/bin/
}

app.executable              ${worksrcpath}/drizzleapp
app.identifier              net.homeunix.dusty.Drizzle

livecheck.type              regex
livecheck.url               http://sourceforge.net/projects/drizzle/files/
livecheck.regex             /${name}(\[0-9.\]+)${extract.suffix}