Ticket #29787: Portfile

File Portfile, 1.7 KB (added by hayato_1980@…, 13 years ago)
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$
3
4PortSystem          1.0
5
6name                apache-solr
7version             3.2.0
8categories          java search
9platforms           darwin
10maintainers         gmail.com:haya10.ito openmaintainer
11license             Apache-2.0
12
13description         The open source enterprise search platform
14
15long_description    Solr is the popular, blazing fast open source enterprise \
16                    search platform from the Apache Lucene project.
17                     
18
19homepage            http://lucene.apache.org/solr/
20master_sites        apache:lucene/solr/${version}/
21distfiles           ${name}-${version}.tgz
22
23checksums           sha1    78caf37494603d69096709ed31455e6e433bff63
24
25extract.suffix      .tgz
26
27use_configure       no
28supported_archs     noarch
29
30build {} 
31
32set java_home       /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
33
34pre-configure {
35    if {![file exists ${java_home}]} {
36        ui_error "Java 1.6 is required, but not located at ${java_home}"
37        return -code error "Java 1.6 missing"
38    }
39}
40
41set extracted        ${workpath}/${name}-${version}
42set target           ${destroot}/${prefix}/share/java/${name}-${version}
43
44destroot {
45    fs-traverse -tails file ${extracted}/example {
46        switch -exact [ file type ${extracted}/example/${file}] {
47            directory {
48                xinstall -d -m 755 ${target}/${file}
49            }
50            file {
51                xinstall -m 644 ${extracted}/example/${file} ${target}/${file}
52            }
53        }
54    }
55    xinstall -m 755 ${filespath}/solr  ${prefix}/bin
56}
57
58post-deactivate {}
59
60post-activate {}
61