Ticket #31155: Portfile.diff
File Portfile.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 21 checksums sha1 e6017419051e5eda9cb222e3b17006eeed682db9 \ 20 extract.suffix .tgz 21 checksums ${distname}${extract.suffix} \ 22 sha1 e6017419051e5eda9cb222e3b17006eeed682db9 \ 22 23 rmd160 ef2c2e58d44a9d8786c2fc5b2f19f59bf9e1f70c 23 24 24 extract.suffix .tgz 25 # set the destination path. 26 set solr_basepath ${prefix}/share/java 27 set solr_destpath ${solr_basepath}/${distname} 28 set solr_path ${solr_destpath}/example 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 41 destroot { 42 # copy the distribution. 43 xinstall -d ${destroot}${solr_basepath} 44 copy ${worksrcpath} ${destroot}${solr_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 } 32 49 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" 50 notes " 51 To try apache-solr, run 'sudo solr' and open http://localhost:8983/solr/browse. 52 To store sample documents, 'cd ${solr_destpath}/example/exampledocs && ./post.sh *.xml'." 53 54 # lucene-gosen is a Japanese analyzer. 55 set gosen_distfile lucene-gosen-1.1.1-ipadic.jar 56 57 variant ja description {Add Japanese settings and lucene-gosen} { 58 homepage-append http://code.google.com/p/lucene-gosen/ 59 60 # fetch lucene-gosen. 61 distfiles-append ${gosen_distfile}:gosen 62 master_sites-append http://lucene-gosen.googlecode.com/files/:gosen 63 checksums-append ${gosen_distfile} \ 64 sha1 2637bf3c4bdb4cb0efd095f4d423e5efb37e4543 \ 65 rmd160 3feacc9c2ac81e2c15f3b8d6a377a85dd6fb6d01 66 extract.only-delete ${gosen_distfile} 67 68 # create solr-ja, solr home for Japanase texts. 69 post-extract { 70 copy ${worksrcpath}/example/solr ${worksrcpath}/example/solr-ja 37 71 } 38 } 72 73 patchfiles-append patch-solr-ja.diff 39 74 40 set target ${prefix}/share/java/${name}-${version} 75 post-destroot { 76 # install lucene-gosen jar and config files. 77 xinstall -d ${destroot}${solr_destpath}/contrib/lucene-gosen/lib 78 copy ${distpath}/${gosen_distfile} \ 79 ${destroot}${solr_destpath}/contrib/lucene-gosen/lib 80 xinstall -m 644 -W ${filespath} \ 81 mapping-japanese.txt \ 82 stoptags_ja.txt \ 83 stopwords_ja.txt \ 84 velocity.properties \ 85 ${destroot}${solr_destpath}/example/solr-ja/conf 86 # copy a sample Japanese doc for testing. 87 copy ${filespath}/solr-ja.xml \ 88 ${destroot}${solr_destpath}/example/exampledocs 89 } 41 90 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 91 notes-append "Please run 'sudo solr -ja' to treat Japanase texts properly." 48 92 } 49 93 50 94 livecheck.type regex 51 livecheck.url http:// mirrors.ibiblio.org/pub/mirrors/apache/lucene/solr/52 livecheck.regex {href="([0-9.]+)"}95 livecheck.url http://www.apache.org/dist/lucene/solr/ 96 livecheck.regex (\[0-9.\]+)\/