source: trunk/dports/java/mahout/Portfile @ 83491

Last change on this file since 83491 was 83491, checked in by hum@…, 8 years ago

mahout: change maintainers; modify the secondary category to math.

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