source: trunk/dports/java/dualist/Portfile

Last change on this file was 95899, checked in by jmr@…, 5 years ago

correct license formatting

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 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 95899 2012-07-26 10:56:29Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                dualist
7version             0.3
8categories          java math textproc
9platforms           darwin
10maintainers         hum openmaintainer
11license             Apache-2
12
13description         An interactive machine learning system for building classifiers quickly.
14
15long_description    DUALIST is an interactive machine learning system for building classifiers \
16                    quickly. It does so by asking \"questions\" of the user in the form of both data \
17                    instances (e.g., text documents) and features (e.g., words or phrases). It \
18                    utilizes active and semi-supervised learning to quickly train a multinomial \
19                    naive Bayes classifier for this setting.
20
21homepage            http://code.google.com/p/dualist/
22master_sites        googlecode:${name}
23checksums           rmd160  74cd7775322249a2bd5791e7ca7d6ebbb75d0fb6 \
24                    sha256  0b49f3d062b3587b7fc1bcd43b7fe8a618ecd869de00db2245209db96a4e8040
25
26depends_run         port:play
27
28use_zip             yes
29worksrcdir          ${name}
30
31use_configure       no
32supported_archs     noarch
33
34build.cmd           true
35
36set share_java_dir  ${prefix}/share/java
37set dualist_dir     ${share_java_dir}/${distname}
38
39destroot {
40    # Copy the distribution.
41    xinstall -m 755 -d  ${destroot}${share_java_dir}
42    copy ${worksrcpath} ${destroot}${dualist_dir}
43    file attributes ${destroot}${dualist_dir}     -permissions 0777
44    file attributes ${destroot}${dualist_dir}/gui -permissions 0777
45
46    # Install the executable script.
47    xinstall -m 755 ${worksrcpath}/dualist       ${destroot}${prefix}/bin
48    reinplace "s|run gui|run ${dualist_dir}/gui|g" ${destroot}${prefix}/bin/dualist
49    reinplace "s|-cp gui|-cp ${dualist_dir}/gui|g" ${destroot}${prefix}/bin/dualist
50}
51
52notes "To try DUALIST, run 'dualist gui' and open http://localhost:8080/."
53
54post-deactivate {
55    ui_msg "To revert the system after uninstalling the port,"
56    ui_msg "delete the dualist directory:"
57    ui_msg "  $ sudo rm -rf ${dualist_dir}"
58}
59
60variant mecab description {Use MeCab to analyze Japanese texts} {
61    depends_lib-append port:mecab-java
62    patchfiles-append  patch-mecab.diff
63
64    post-extract {
65        copy ${filespath}/SimpleMecabPipe.java ${worksrcpath}/core/src/dualist/pipes
66        ln -s ${prefix}/share/java/mecab.jar ${worksrcpath}/core/lib/mecab.jar
67    }
68
69    build.cmd           ant
70    build.target        main
71
72    post-destroot {
73        # Install another executable script using mecab.
74        xinstall -m 755 ${filespath}/dualist-mecab     ${destroot}${prefix}/bin
75        reinplace "s|run gui|run ${dualist_dir}/gui|g" ${destroot}${prefix}/bin/dualist-mecab
76        reinplace "s|-cp gui|-cp ${dualist_dir}/gui|g" ${destroot}${prefix}/bin/dualist-mecab
77        reinplace "s|@prefix@|${prefix}|g"             ${destroot}${prefix}/bin/dualist-mecab
78    }
79
80    notes-append "For Japanese texts, run 'dualist-mecab gui' instead of 'dualist gui'."
81}
Note: See TracBrowser for help on using the repository browser.