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

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

apache-solr4: update to 4.10.4; fix livecheck.regex

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