Ticket #31155: Portfile.2.diff
File Portfile.2.diff, 4.5 KB (added by humem (humem), 13 years ago) |
---|
-
Portfile
old new 5 5 6 6 name apache-solr 7 7 version 3.3.0 8 categories java search 8 revision 1 9 categories java textproc 9 10 platforms darwin 10 maintainers gmail.com:haya10.ito openmaintainer11 maintainers gmail.com:haya10.ito hum openmaintainer 11 12 license Apache-2.0 12 13 13 description The open source enterprise search platform 14 14 homepage http://lucene.apache.org/solr/ 15 description An open source enterprise search platform. 15 16 long_description Solr is the popular, blazing fast open source enterprise \ 16 17 search platform from the Apache Lucene project. 17 18 18 homepage http://lucene.apache.org/solr/19 19 master_sites apache:lucene/solr/${version}/ 20 20 extract.suffix .tgz 21 21 checksums sha1 e6017419051e5eda9cb222e3b17006eeed682db9 \ 22 22 rmd160 ef2c2e58d44a9d8786c2fc5b2f19f59bf9e1f70c 23 23 24 extract.suffix .tgz 24 # set the destination paths. 25 set java_basepath ${prefix}/share/java 26 set solr_destpath ${java_basepath}/${distname} 27 set solr_path ${solr_destpath}/example 28 set solr_home ${solr_path}/solr 29 30 post-patch { 31 # expand relative pathes into abusolute ones. 32 reinplace "s|\"\.\./\.\./|\"${solr_destpath}/|g" \ 33 ${worksrcpath}/example/solr/conf/solrconfig.xml 34 } 25 35 26 36 use_configure no 27 37 supported_archs noarch 28 38 29 39 build {} 30 40 31 set java_home /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home 32 33 pre-configure { 34 if {![file exists ${java_home}]} { 35 ui_error "Java 1.6 is required, but not located at ${java_home}" 36 return -code error "Java 1.6 missing" 37 } 41 destroot { 42 # copy the distribution. 43 xinstall -d ${destroot}${java_basepath} 44 copy ${worksrcpath} ${destroot}${java_basepath} 45 # install the solr script. 46 xinstall -m 755 ${filespath}/solr.in ${destroot}${prefix}/bin/solr 47 reinplace "s|@solr_path@|${solr_path}|g" ${destroot}${prefix}/bin/solr 48 reinplace "s|@solr_home@|${solr_home}|g" ${destroot}${prefix}/bin/solr 38 49 } 39 50 40 set target ${prefix}/share/java/${name}-${version} 51 notes " 52 To try apache-solr, run 'sudo solr' and open http://localhost:8983/solr/browse. 53 To store sample documents, run 'cd ${solr_path}/exampledocs && ./post.sh *.xml'." 54 55 # solr home for Japanese configurations. 56 set solr_home_ja ${solr_home}-ja 57 58 variant ja description {Add Japanese settings with lucene-gosen} { 59 depends_run-append port:lucene-gosen 60 # create Japanese solr home 'solr-ja'. 61 post-extract { 62 copy ${worksrcpath}/example/solr ${worksrcpath}/example/solr-ja 63 } 64 patchfiles-append patch-solr-ja.diff 65 post-patch { 66 # expand relative pathes into abusolute ones. 67 reinplace "s|\"\.\./\.\./|\"${solr_destpath}/|g" \ 68 ${worksrcpath}/example/solr-ja/conf/solrconfig.xml 69 } 70 post-destroot { 71 # set the lucene-gosen configuration path to config files. 72 foreach config {schema.xml solrconfig.xml} { 73 reinplace "s|@gosen_path@|${java_basepath}/lucene-gosen|g" \ 74 ${destroot}${solr_home_ja}/conf/${config} 75 } 76 # install a property file for UTF-8 encoding. 77 copy ${filespath}/velocity.properties ${destroot}${solr_home_ja}/conf 78 # copy a sample Japanese doc for testing. 79 copy ${filespath}/solr-ja.xml ${destroot}${solr_path}/exampledocs 80 # install the solr-ja script. 81 xinstall -m 755 ${filespath}/solr.in ${destroot}${prefix}/bin/solr-ja 82 reinplace "s|@solr_path@|${solr_path}|g" ${destroot}${prefix}/bin/solr-ja 83 reinplace "s|@solr_home@|${solr_home_ja}|g" ${destroot}${prefix}/bin/solr-ja 84 } 85 notes-append " 41 86 42 destroot { 43 xinstall -d ${destroot}[file dirname ${target}] 44 copy ${worksrcpath}/example ${destroot}${target} 45 xinstall -m 755 ${filespath}/solr.in ${destroot}${prefix}/bin/solr 46 reinplace "s|@TARGET@|${target}|g" ${destroot}${prefix}/bin/solr 47 reinplace "s|@JAVA_HOME@|${java_home}|g" ${destroot}${prefix}/bin/solr 87 For Japanese texts, please run 'sudo solr-ja' instead of 'sudo solr'. 88 See ${solr_home_ja}." 48 89 } 49 90 50 91 livecheck.type regex 51 livecheck.url http:// mirrors.ibiblio.org/pub/mirrors/apache/lucene/solr/52 livecheck.regex {href="([0-9.]+)"}92 livecheck.url http://www.apache.org/dist/lucene/solr/ 93 livecheck.regex (\[0-9.\]+)\/