Fetching contributors…
Cannot retrieve contributors at this time
95 lines (76 sloc) 3.31 KB
# -*- 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
PortSystem 1.0
name apache-solr3
version 3.6.2
revision 1
categories java textproc
maintainers openmaintainer
description An open source enterprise search platform.
long_description Solr is the popular, blazing fast open source enterprise \
search platform from the Apache Lucene project.
platforms darwin
supported_archs noarch
license Apache-2
dist_subdir apache-solr
distname apache-solr-${version}
extract.suffix .tgz
master_sites apache:lucene/solr/${version}
checksums rmd160 2f6b734c88979c2079658a21cc9358e12f228254 \
sha256 537426dcbdd0dc82dd5bf16b48b6bcaf87cb4049c1245eea8dcb79eeaf3e7ac6
# set the destination paths.
set java_basepath ${prefix}/share/java
set solr_destpath ${java_basepath}/${distname}
set solr_path ${solr_destpath}/example
set solr_home ${solr_path}/solr
patchfiles patch-head.vm.diff
post-patch {
# expand relative pathes into abusolute ones.
reinplace "s|\"\\.\\./\\.\\./|\"${solr_destpath}/|g" \
use_configure no
build {}
destroot {
# copy the distribution.
xinstall -d ${destroot}${java_basepath}
copy ${worksrcpath} ${destroot}${java_basepath}
# install the solr script.
xinstall -m 755 ${filespath}/ ${destroot}${prefix}/bin/solr3
reinplace "s|@solr_path@|${solr_path}|g" ${destroot}${prefix}/bin/solr3
reinplace "s|@solr_home@|${solr_home}|g" ${destroot}${prefix}/bin/solr3
notes "
To try apache-solr3, run 'sudo solr3' and open http://localhost:8983/solr/browse.
To store sample documents, run 'cd ${solr_path}/exampledocs && ./ *.xml'."
# solr home for Japanese configurations.
set solr_home_ja ${solr_home}-ja
variant ja description {Add Japanese settings} {
# create Japanese solr home 'solr-ja'.
post-extract {
copy ${worksrcpath}/example/solr ${worksrcpath}/example/solr-ja
patchfiles-append patch-solr-ja.diff
post-patch {
# expand relative pathes into abusolute ones.
reinplace "s|\"\\.\\./\\.\\./|\"${solr_destpath}/|g" \
post-destroot {
# install a property file for UTF-8 encoding.
copy ${filespath}/ ${destroot}${solr_home_ja}/conf
# copy a sample Japanese doc for testing.
copy ${filespath}/solr-ja.xml ${destroot}${solr_path}/exampledocs
# install the solr-ja script.
xinstall -m 755 ${filespath}/ ${destroot}${prefix}/bin/solr3-ja
reinplace "s|@solr_path@|${solr_path}|g" ${destroot}${prefix}/bin/solr3-ja
reinplace "s|@solr_home@|${solr_home_ja}|g" ${destroot}${prefix}/bin/solr3-ja
notes-append "
For Japanese texts, please run 'sudo solr3-ja' instead of 'sudo solr3'.
See ${solr_home_ja}."
livecheck.type none
#livecheck.type regex
#livecheck.regex (3.\[0-9.\]+)\/