source: trunk/dports/math/mallet/Portfile

Last change on this file was 112684, checked in by hum@…, 4 years ago

mallet: install doc and examples according to the standard file hierarchy; install jar files in ${prefix}/share/java/${name} and fix pathes in mallet script.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1# -*- 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
2# $Id: Portfile 112684 2013-10-29 14:10:44Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                mallet
7version             2.0.7
8revision            1
9categories          math java
10maintainers         hum openmaintainer
11
12description         MAchine Learning for LanguagE Toolkit (MALLET)
13long_description    MALLET is a Java-based package for statistical natural \
14                    language processing, document classification, clustering, \
15                    topic modeling, information extraction, and other machine \
16                    learning applications to text.
17
18homepage            http://mallet.cs.umass.edu/
19platforms           darwin
20supported_archs     noarch
21license             CPL-1
22
23master_sites        http://mallet.cs.umass.edu/dist/
24checksums           rmd160  083f76b447521dbaa1d3b5747278a41e9b9ba741 \
25                    sha256  bf34241b0589be2d28d57a4b369b4d722f273591cb28bf428d0167f58f91f161
26
27patchfiles          patch-mallet.diff
28
29use_configure       no
30
31build {}
32
33destroot {
34    # install jar files.
35    xinstall -d ${destroot}${prefix}/share/java
36    set malletdir ${prefix}/share/java/${distname}
37    copy ${worksrcpath}/dist ${destroot}${malletdir}
38    system "chmod -R a+rx ${destroot}${malletdir}"
39    # install a command utility.
40    xinstall -m 755 ${worksrcpath}/bin/mallet ${destroot}${prefix}/bin
41    reinplace "s|@malletdir@|${malletdir}|"   ${destroot}${prefix}/bin/mallet
42    # install additional documents.
43    set dest_doc ${destroot}${prefix}/share/doc/${name}
44    xinstall -d ${dest_doc}
45    xinstall -m 644 ${worksrcpath}/LICENSE ${dest_doc}
46    # install examples.
47    xinstall -d ${destroot}${prefix}/share/examples
48    set dest_ex ${destroot}${prefix}/share/examples/${name}
49    copy ${worksrcpath}/sample-data ${dest_ex}
50    system "chmod -R a+rx ${dest_ex}"
51}
52   
53livecheck.type      regex
54livecheck.url       http://mallet.cs.umass.edu/download.php
55livecheck.regex     ${name}-(\[\\d\\.\]+)\\.tar
Note: See TracBrowser for help on using the repository browser.