source: trunk/dports/java/mahout/Portfile

Last change on this file was 117033, checked in by hum@…, 3 years ago

mahout: update to 0.9.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 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 117033 2014-02-13 15:49:07Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                mahout
7version             0.9
8categories          java math
9maintainers         hum openmaintainer
10
11description         A scalable machine learning library that supports large data sets
12long_description    Mahout is a scalable machine learning library that implements many \
13                    different approaches to machine learning. \
14                    The project currently contains implementations of algorithms for \
15                    classification, clustering, genetic programming and collaborative \
16                    filtering, all enabled to scale by leveraging the power of Hadoop's \
17                    Map-Reduce (http://hadoop.apache.org) implementation.
18
19homepage            http://mahout.apache.org/
20platforms           darwin
21license             Apache-2
22
23master_sites        apache:${name}/${version}
24checksums           rmd160  545417d7257b42500268475da9d87e28f163b29d \
25                    sha256  d7a0f2c58ee464a9011b0fc189f79abd7863111ce2b3635bdadb282112cc240f
26
27distname            ${name}-distribution-${version}
28
29depends_lib         port:hadoop
30
31use_configure       no
32supported_archs     noarch
33
34build {}
35
36set mahout_home     ${prefix}/share/java/${distname}
37set mahout_log_dir  ${prefix}/var/hadoop/log
38
39destroot {
40    # Copy the distribution to Mahout home directory.
41    xinstall -m 755 -${destroot}${prefix}/share/java
42    copy ${worksrcpath} ${destroot}${prefix}/share/java/
43
44    # Read the configuration of Hadoop from 'hadoop-bin'.
45    set f [open ${prefix}/bin/hadoop-bin]
46    set string [read $f]
47    close $f
48    regexp {JAVA_HOME=(\S+)}   $string m java_home
49    regexp {HADOOP_HOME=(\S+)} $string m hadoop_home
50    regexp {sudo -E -u (\S+)}  $string m hadoopuser
51
52    # Install an extra script for this port.
53    set mahout_bin ${destroot}${prefix}/bin/mahout-bin
54    xinstall -m 755 ${filespath}/mahout-bin            ${mahout_bin}
55    reinplace "s|@java_home@|${java_home}|g"           ${mahout_bin}
56    reinplace "s|@hadoop_home@|${hadoop_home}|g"       ${mahout_bin}
57    reinplace "s|@mahout_home@|${mahout_home}|g"       ${mahout_bin}
58    reinplace "s|@mahout_log_dir@|${mahout_log_dir}|g" ${mahout_bin}
59    reinplace "s|@hadoopuser@|${hadoopuser}|g"         ${mahout_bin}
60}
61
62livecheck.type      regex
63livecheck.url       http://www.apache.org/dist/mahout/
64livecheck.regex     >(\[0-9.\]+)\/<
Note: See TracBrowser for help on using the repository browser.