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

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

apache-solr3: link to the Google-hosted jquery instead of fetching one; see http://lists.macosforge.org/pipermail/macports-dev/2012-December/021340.html.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
RevLine 
[79407]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 100865 2012-12-30 11:47:56Z hum@macports.org $
3
4PortSystem          1.0
5
[98746]6name                apache-solr3
[100808]7version             3.6.2
[100865]8revision            1
[83880]9categories          java textproc
[98746]10maintainers         hum gmail.com:haya10.ito openmaintainer
[79407]11
[83880]12description         An open source enterprise search platform.
[98746]13
[79407]14long_description    Solr is the popular, blazing fast open source enterprise \
15                    search platform from the Apache Lucene project.
16
[91890]17homepage            http://lucene.apache.org/solr/
18platforms           darwin
19supported_archs     noarch
[95899]20license             Apache-2
[91890]21
[98746]22dist_subdir         apache-solr
23distname            apache-solr-${version}
[91890]24extract.suffix      .tgz
[79407]25
[100865]26master_sites        apache:lucene/solr/${version}
27checksums           rmd160  2f6b734c88979c2079658a21cc9358e12f228254 \
28                    sha256  537426dcbdd0dc82dd5bf16b48b6bcaf87cb4049c1245eea8dcb79eeaf3e7ac6
[96455]29
[83880]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
[79407]35
[96158]36patchfiles          patch-head.vm.diff
37
[83880]38post-patch {
39    # expand relative pathes into abusolute ones.
[88853]40    reinplace "s|\"\\.\\./\\.\\./|\"${solr_destpath}/|g" \
[83880]41        ${worksrcpath}/example/solr/conf/solrconfig.xml
42}
43
[79407]44use_configure       no
45
46build {}
47
[83880]48destroot {
49    # copy the distribution.
50    xinstall -d         ${destroot}${java_basepath}
51    copy ${worksrcpath} ${destroot}${java_basepath}
52    # install the solr script.
[98746]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
[83880]56}
[79407]57
[83880]58notes "
[98746]59To try apache-solr3, run 'sudo solr3' and open http://localhost:8983/solr/browse.
[83880]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
[91889]65variant ja description {Add Japanese settings} {
[83880]66    # create Japanese solr home 'solr-ja'.
67    post-extract {
68        copy ${worksrcpath}/example/solr ${worksrcpath}/example/solr-ja
[79407]69    }
[83880]70    patchfiles-append   patch-solr-ja.diff
71    post-patch {
72        # expand relative pathes into abusolute ones.
[88853]73        reinplace "s|\"\\.\\./\\.\\./|\"${solr_destpath}/|g" \
[83880]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.
[98746]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
[83880]85    }
86    notes-append "
[79407]87
[98746]88For Japanese texts, please run 'sudo solr3-ja' instead of 'sudo solr3'.
[83880]89See ${solr_home_ja}."
[79407]90}
[80204]91
92livecheck.type      regex
[83880]93livecheck.url       http://www.apache.org/dist/lucene/solr/
[98746]94livecheck.regex     (3.\[0-9.\]+)\/
Note: See TracBrowser for help on using the repository browser.