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

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

apache-solr3: update to 3.6.2; update jquery-1.8.3.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 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 100808 2012-12-26 16:01:21Z hum@macports.org $
3
4PortSystem          1.0
5
6name                apache-solr3
7version             3.6.2
8categories          java textproc
9maintainers         hum gmail.com:haya10.ito 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            apache-solr-${version}
23extract.suffix      .tgz
24
25# install jquery file.
26set jquery_file     jquery-1.8.3.min.js
27
28distfiles-append    ${jquery_file}:js
29
30master_sites        apache:lucene/solr/${version}/ \
31                    http://code.jquery.com/:js
32checksums           ${distname}${extract.suffix} \
33                    rmd160  2f6b734c88979c2079658a21cc9358e12f228254 \
34                    sha256  537426dcbdd0dc82dd5bf16b48b6bcaf87cb4049c1245eea8dcb79eeaf3e7ac6 \
35                    ${jquery_file} \
36                    rmd160  e86b3151afcf6fab4da367cbce4ecd3f4cd756d0 \
37                    sha256  ba6eda7945ab8d7e57b34cc5a3dd292fa2e4c60a5ced79236ecf1a9e0f0c2d32
38
39extract.only-delete ${jquery_file}
40
41# set the destination paths.
42set java_basepath   ${prefix}/share/java
43set solr_destpath   ${java_basepath}/${distname}
44set solr_path       ${solr_destpath}/example
45set solr_home       ${solr_path}/solr
46
47patchfiles          patch-head.vm.diff
48
49post-patch {
50    # copy jquery file.
51    copy ${distpath}/${jquery_file} ${worksrcpath}/example/solr/conf/velocity/
52    # expand relative pathes into abusolute ones.
53    reinplace "s|\"\\.\\./\\.\\./|\"${solr_destpath}/|g" \
54        ${worksrcpath}/example/solr/conf/solrconfig.xml
55}
56
57use_configure       no
58
59build {}
60
61destroot {
62    # copy the distribution.
63    xinstall -d         ${destroot}${java_basepath}
64    copy ${worksrcpath} ${destroot}${java_basepath}
65    # install the solr script.
66    xinstall -m 755 ${filespath}/solr.in     ${destroot}${prefix}/bin/solr3
67    reinplace "s|@solr_path@|${solr_path}|g" ${destroot}${prefix}/bin/solr3
68    reinplace "s|@solr_home@|${solr_home}|g" ${destroot}${prefix}/bin/solr3
69}
70
71notes "
72To try apache-solr3, run 'sudo solr3' and open http://localhost:8983/solr/browse.
73To store sample documents, run 'cd ${solr_path}/exampledocs && ./post.sh *.xml'."
74
75# solr home for Japanese configurations.
76set solr_home_ja    ${solr_home}-ja
77
78variant ja description {Add Japanese settings} {
79    # create Japanese solr home 'solr-ja'.
80    post-extract {
81        copy ${worksrcpath}/example/solr ${worksrcpath}/example/solr-ja
82    }
83    patchfiles-append   patch-solr-ja.diff
84    post-patch {
85        # expand relative pathes into abusolute ones.
86        reinplace "s|\"\\.\\./\\.\\./|\"${solr_destpath}/|g" \
87            ${worksrcpath}/example/solr-ja/conf/solrconfig.xml
88    }
89    post-destroot {
90        # install a property file for UTF-8 encoding.
91        copy ${filespath}/velocity.properties ${destroot}${solr_home_ja}/conf
92        # copy a sample Japanese doc for testing.
93        copy ${filespath}/solr-ja.xml ${destroot}${solr_path}/exampledocs
94        # install the solr-ja script.
95        xinstall -m 755 ${filespath}/solr.in        ${destroot}${prefix}/bin/solr3-ja
96        reinplace "s|@solr_path@|${solr_path}|g"    ${destroot}${prefix}/bin/solr3-ja
97        reinplace "s|@solr_home@|${solr_home_ja}|g" ${destroot}${prefix}/bin/solr3-ja
98    }
99    notes-append "
100
101For Japanese texts, please run 'sudo solr3-ja' instead of 'sudo solr3'.
102See ${solr_home_ja}."
103}
104
105livecheck.type      regex
106livecheck.url       http://www.apache.org/dist/lucene/solr/
107livecheck.regex     (3.\[0-9.\]+)\/
Note: See TracBrowser for help on using the repository browser.