source: trunk/dports/java/apache-solr3/Portfile

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

apache-solr3: disable livecheck.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 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 109656 2013-08-19 14:34:25Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                apache-solr3
7version             3.6.2
8revision            1
9categories          java textproc
10maintainers         hum gmail.com:haya10.ito openmaintainer
11
12description         An open source enterprise search platform.
13
14long_description    Solr is the popular, blazing fast open source enterprise \
15                    search platform from the Apache Lucene project.
16
17homepage            http://lucene.apache.org/solr/
18platforms           darwin
19supported_archs     noarch
20license             Apache-2
21
22dist_subdir         apache-solr
23distname            apache-solr-${version}
24extract.suffix      .tgz
25
26master_sites        apache:lucene/solr/${version}
27checksums           rmd160  2f6b734c88979c2079658a21cc9358e12f228254 \
28                    sha256  537426dcbdd0dc82dd5bf16b48b6bcaf87cb4049c1245eea8dcb79eeaf3e7ac6
29
30# set the destination paths.
31set java_basepath   ${prefix}/share/java
32set solr_destpath   ${java_basepath}/${distname}
33set solr_path       ${solr_destpath}/example
34set solr_home       ${solr_path}/solr
35
36patchfiles          patch-head.vm.diff
37
38post-patch {
39    # expand relative pathes into abusolute ones.
40    reinplace "s|\"\\.\\./\\.\\./|\"${solr_destpath}/|g" \
41        ${worksrcpath}/example/solr/conf/solrconfig.xml
42}
43
44use_configure       no
45
46build {}
47
48destroot {
49    # copy the distribution.
50    xinstall -d         ${destroot}${java_basepath}
51    copy ${worksrcpath} ${destroot}${java_basepath}
52    # install the solr script.
53    xinstall -m 755 ${filespath}/solr.in     ${destroot}${prefix}/bin/solr3
54    reinplace "s|@solr_path@|${solr_path}|g" ${destroot}${prefix}/bin/solr3
55    reinplace "s|@solr_home@|${solr_home}|g" ${destroot}${prefix}/bin/solr3
56}
57
58notes "
59To try apache-solr3, run 'sudo solr3' and open http://localhost:8983/solr/browse.
60To store sample documents, run 'cd ${solr_path}/exampledocs && ./post.sh *.xml'."
61
62# solr home for Japanese configurations.
63set solr_home_ja    ${solr_home}-ja
64
65variant ja description {Add Japanese settings} {
66    # create Japanese solr home 'solr-ja'.
67    post-extract {
68        copy ${worksrcpath}/example/solr ${worksrcpath}/example/solr-ja
69    }
70    patchfiles-append   patch-solr-ja.diff
71    post-patch {
72        # expand relative pathes into abusolute ones.
73        reinplace "s|\"\\.\\./\\.\\./|\"${solr_destpath}/|g" \
74            ${worksrcpath}/example/solr-ja/conf/solrconfig.xml
75    }
76    post-destroot {
77        # install a property file for UTF-8 encoding.
78        copy ${filespath}/velocity.properties ${destroot}${solr_home_ja}/conf
79        # copy a sample Japanese doc for testing.
80        copy ${filespath}/solr-ja.xml ${destroot}${solr_path}/exampledocs
81        # install the solr-ja script.
82        xinstall -m 755 ${filespath}/solr.in        ${destroot}${prefix}/bin/solr3-ja
83        reinplace "s|@solr_path@|${solr_path}|g"    ${destroot}${prefix}/bin/solr3-ja
84        reinplace "s|@solr_home@|${solr_home_ja}|g" ${destroot}${prefix}/bin/solr3-ja
85    }
86    notes-append "
87
88For Japanese texts, please run 'sudo solr3-ja' instead of 'sudo solr3'.
89See ${solr_home_ja}."
90}
91
92livecheck.type      none
93#livecheck.type      regex
94#livecheck.url       http://www.apache.org/dist/lucene/solr/
95#livecheck.regex     (3.\[0-9.\]+)\/
Note: See TracBrowser for help on using the repository browser.