Blame SPECS/lucene.spec

536d70
%bcond_with     jp_minimal
536d70
536d70
Summary:        High-performance, full-featured text search engine
536d70
Name:           lucene
536d70
Version:        8.4.1
536d70
Release:        5%{?dist}
536d70
Epoch:          0
536d70
License:        ASL 2.0
536d70
URL:            http://lucene.apache.org/
536d70
# solr source contains both lucene and dev-tools
536d70
Source0:        https://archive.apache.org/dist/lucene/solr/%{version}/solr-%{version}-src.tgz
536d70
536d70
Patch0:         0001-Disable-ivy-settings.patch
536d70
Patch1:         0002-Dependency-generation.patch
536d70
536d70
BuildRequires:  ant
536d70
BuildRequires:  ivy-local
536d70
BuildRequires:  maven-local
536d70
BuildRequires:  mvn(com.ibm.icu:icu4j)
536d70
BuildRequires:  mvn(org.apache:apache:pom:)
536d70
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
536d70
%if %{without jp_minimal}
536d70
BuildRequires:  mvn(commons-codec:commons-codec)
536d70
BuildRequires:  mvn(javax.servlet:javax.servlet-api)
536d70
BuildRequires:  mvn(javax.servlet:servlet-api)
536d70
BuildRequires:  mvn(junit:junit)
536d70
BuildRequires:  mvn(org.antlr:antlr4-runtime)
536d70
BuildRequires:  mvn(org.apache.commons:commons-compress)
536d70
BuildRequires:  mvn(org.eclipse.jetty:jetty-continuation)
536d70
BuildRequires:  mvn(org.eclipse.jetty:jetty-http)
536d70
BuildRequires:  mvn(org.eclipse.jetty:jetty-io)
536d70
BuildRequires:  mvn(org.eclipse.jetty:jetty-server)
536d70
BuildRequires:  mvn(org.eclipse.jetty:jetty-servlet)
536d70
BuildRequires:  mvn(org.eclipse.jetty:jetty-util)
536d70
BuildRequires:  mvn(org.ow2.asm:asm)
536d70
BuildRequires:  mvn(org.ow2.asm:asm-commons)
536d70
BuildRequires:  mvn(xerces:xercesImpl)
536d70
%endif
536d70
536d70
Provides:       %{name}-core = %{epoch}:%{version}-%{release}
536d70
536d70
# Obsolete since F32
536d70
# Required deps were removed from fedora
536d70
Obsoletes: %{name}-benchmark < 8.1.1-3
536d70
Obsoletes: %{name}-demo < 8.1.1-3
536d70
Obsoletes: %{name}-facet < 8.1.1-3
536d70
Obsoletes: %{name}-replicator < 8.1.1-3
536d70
Obsoletes: %{name}-spatial < 8.1.1-3
536d70
Obsoletes: %{name}-spatial-extras < 8.1.1-3
536d70
Obsoletes: %{name}-spatial3d < 8.1.1-3
536d70
Obsoletes: %{name}-test-framework < 8.4.1-4
536d70
536d70
%if %{with jp_minimal}
536d70
# Remove left-over packages that would have broken deps when built in minimal mode
536d70
Obsoletes: %{name}-parent < %{version}-%{release}
536d70
Obsoletes: %{name}-solr-grandparent < %{version}-%{release}
536d70
Obsoletes: %{name}-expressions < %{version}-%{release}
536d70
Obsoletes: %{name}-analyzers-phonetic < %{version}-%{release}
536d70
Obsoletes: %{name}-analyzers-icu < %{version}-%{release}
536d70
Obsoletes: %{name}-analyzers-nori < %{version}-%{release}
536d70
Obsoletes: %{name}-analyzers-kuromoji < %{version}-%{release}
536d70
Obsoletes: %{name}-analyzers-stempel < %{version}-%{release}
536d70
%endif
536d70
536d70
BuildArch:      noarch
536d70
536d70
%description
536d70
Apache Lucene is a high-performance, full-featured text search
536d70
engine library written entirely in Java. It is a technology suitable
536d70
for nearly any application that requires full-text search, especially
536d70
cross-platform.
536d70
536d70
%package analysis
536d70
Summary:      Lucene Common Analyzers
536d70
# Obsoletes since F30
536d70
# This module was removed upstream and no replacement exists
536d70
Obsoletes: %{name}-analyzers-uima < 8.1.1-3
536d70
# Obsolete since F32
536d70
# Required deps were removed from fedora
536d70
Obsoletes: %{name}-analyzers-morfologik < 8.1.1-3
536d70
536d70
%description analysis
536d70
Lucene Common Analyzers.
536d70
536d70
%package analyzers-smartcn
536d70
Summary:      Smart Chinese Analyzer
536d70
536d70
%description analyzers-smartcn
536d70
Lucene Smart Chinese Analyzer.
536d70
536d70
%package grouping
536d70
Summary:      Lucene Grouping Module
536d70
536d70
%description grouping
536d70
Lucene Grouping Module.
536d70
536d70
%package highlighter
536d70
Summary:      Lucene Highlighter Module
536d70
536d70
%description highlighter
536d70
Lucene Highlighter Module.
536d70
536d70
%package join
536d70
Summary:      Lucene Join Module
536d70
536d70
%description join
536d70
Lucene Join Module.
536d70
536d70
%package memory
536d70
Summary:      Lucene Memory Module
536d70
536d70
%description memory
536d70
High-performance single-document index to compare against Query.
536d70
536d70
%package misc
536d70
Summary:      Miscellaneous Lucene extensions
536d70
536d70
%description misc
536d70
Miscellaneous Lucene extensions.
536d70
536d70
%package queries
536d70
Summary:      Lucene Queries Module
536d70
536d70
%description queries
536d70
Lucene Queries Module.
536d70
536d70
%package queryparser
536d70
Summary:      Lucene QueryParsers Module
536d70
536d70
%description queryparser
536d70
Lucene QueryParsers Module.
536d70
536d70
%package sandbox
536d70
Summary:      Lucene Sandbox Module
536d70
536d70
%description sandbox
536d70
Lucene Sandbox Module.
536d70
536d70
%package backward-codecs
536d70
Summary:      Lucene Backward Codecs Module
536d70
536d70
%description backward-codecs
536d70
Codecs for older versions of Lucene.
536d70
536d70
%package codecs
536d70
Summary:      Codecs and postings formats for Apache Lucene
536d70
536d70
%description codecs
536d70
Codecs and postings formats for Apache Lucene.
536d70
536d70
%package classification
536d70
Summary:      Lucene Classification Module
536d70
536d70
%description classification
536d70
Lucene Classification Module.
536d70
536d70
%package suggest
536d70
Summary:      Lucene Suggest Module
536d70
536d70
%description suggest
536d70
Lucene Suggest Module.
536d70
536d70
%package monitor
536d70
Summary:      Lucene Monitor Module
536d70
536d70
%description monitor
536d70
Lucene Monitor Module.
536d70
536d70
%if %{without jp_minimal}
536d70
536d70
%package parent
536d70
Summary:      Parent POM for Lucene
536d70
536d70
%description parent
536d70
Parent POM for Lucene.
536d70
536d70
%package solr-grandparent
536d70
Summary:      Lucene Solr grandparent POM
536d70
536d70
%description solr-grandparent
536d70
Lucene Solr grandparent POM.
536d70
536d70
%package expressions
536d70
Summary:      Lucene Expressions Module
536d70
536d70
%description expressions
536d70
Dynamically computed values to sort/facet/search on based on a pluggable
536d70
grammar.
536d70
536d70
%package analyzers-phonetic
536d70
Summary:      Lucene Phonetic Filters
536d70
536d70
%description analyzers-phonetic
536d70
Provides phonetic encoding via Commons Codec.
536d70
536d70
%package analyzers-icu
536d70
Summary:      Lucene ICU Analysis Components
536d70
536d70
%description analyzers-icu
536d70
Provides integration with ICU (International Components for Unicode) for
536d70
stronger Unicode and internationalization support.
536d70
536d70
%package analyzers-nori
536d70
Summary:      An analyzer with morphological analysis for Korean
536d70
536d70
%description analyzers-nori
536d70
An analyzer with morphological analysis for Korean.
536d70
536d70
%package analyzers-kuromoji
536d70
Summary:      Lucene Kuromoji Japanese Morphological Analyzer
536d70
536d70
%description analyzers-kuromoji
536d70
Lucene Kuromoji Japanese Morphological Analyzer.
536d70
536d70
%package analyzers-stempel
536d70
Summary:      Lucene Stempel Analyzer
536d70
536d70
%description analyzers-stempel
536d70
Lucene Stempel Analyzer.
536d70
536d70
%endif
536d70
536d70
%package javadoc
536d70
Summary:        Javadoc for Lucene
536d70
536d70
%description javadoc
536d70
%{summary}.
536d70
536d70
%prep
536d70
%setup -q -n solr-%{version}
536d70
536d70
%patch0 -p1
536d70
%patch1 -p1
536d70
536d70
rm -rf solr
536d70
536d70
find -name "*.jar" -delete
536d70
536d70
mkdir -p lucene/build/analysis/{kuromoji,nori}
536d70
536d70
# don't generate uses clauses in osgi metadata
536d70
sed -i -e "/<Export-Package>/a<_nouses>true</_nouses>" dev-tools/maven/pom.xml.template
536d70
536d70
# compatibility with existing packages
536d70
%mvn_alias :%{name}-analyzers-common :%{name}-analyzers
536d70
536d70
%mvn_package ":%{name}-analysis-modules-aggregator" %{name}-analysis
536d70
%mvn_package ":%{name}-analyzers-common" %{name}-analysis
536d70
%mvn_package ":{*}-aggregator" @1
536d70
536d70
%build
536d70
pushd %{name}
536d70
find -maxdepth 2 -type d -exec mkdir -p '{}/lib' \;
536d70
536d70
# generate maven dependencies
536d70
ant -f build.xml generate-maven-artifacts -Divy.mode=local -Dversion=%{version} -Divy.available=true
536d70
536d70
# fix source dir + move to expected place
536d70
for pom in `find build/poms/%{name} -name pom.xml`; do
536d70
    sed 's/\${module-path}/${basedir}/g' "$pom" > "${pom##build/poms/%{name}/}"
536d70
done
536d70
%pom_disable_module src/test core
536d70
%pom_disable_module src/test codecs
536d70
536d70
popd
536d70
536d70
mv lucene/build/poms/pom.xml .
536d70
536d70
# deal with split packages in core/misc/analysis modules by adding additional metadata and
536d70
# require-bundling the core bundle from misc
536d70
%pom_xpath_set "pom:Export-Package" "*;version=\"%{version}\""
536d70
%pom_add_plugin org.apache.felix:maven-bundle-plugin lucene/misc \
536d70
"<configuration><instructions>
536d70
<Require-Bundle>org.apache.lucene.core;bundle-version=\"%{version}\"</Require-Bundle>
536d70
<Export-Package>
536d70
 org.apache.lucene.document;version=\"%{version}\";misc=split;mandatory:=misc,
536d70
 org.apache.lucene.index;version=\"%{version}\";misc=split;mandatory:=misc,
536d70
 org.apache.lucene.search;version=\"%{version}\";misc=split;mandatory:=misc,
536d70
 org.apache.lucene.store;version=\"%{version}\";misc=split;mandatory:=misc,
536d70
 org.apache.lucene.util.fst;version=\"%{version}\";misc=split;mandatory:=misc,
536d70
 *;version=\"%{version}\"</Export-Package>
536d70
</instructions></configuration>"
536d70
%pom_add_plugin org.apache.felix:maven-bundle-plugin lucene/analysis/common \
536d70
"<configuration><instructions>
536d70
<Require-Bundle>org.apache.lucene.core;bundle-version=\"%{version}\"</Require-Bundle>
536d70
<Export-Package>
536d70
 org.apache.lucene.analysis.standard;version=\"%{version}\";analysis=split;mandatory:=analysis,
536d70
 *;version=\"%{version}\"</Export-Package>
536d70
</instructions></configuration>"
536d70
536d70
%pom_disable_module solr
536d70
%pom_remove_plugin -r :gmaven-plugin
536d70
%pom_remove_plugin -r :maven-enforcer-plugin
536d70
%pom_remove_plugin -r :forbiddenapis
536d70
%pom_remove_plugin -r :buildnumber-maven-plugin
536d70
536d70
# don't build modules for which deps are not in fedora or not new enough in fedora
536d70
pushd lucene
536d70
%pom_disable_module benchmark
536d70
%pom_disable_module demo
536d70
%pom_disable_module test-framework
536d70
%pom_disable_module facet
536d70
%pom_disable_module replicator
536d70
%pom_disable_module spatial
536d70
%pom_disable_module spatial-extras
536d70
%pom_disable_module spatial3d
536d70
536d70
%pom_disable_module opennlp analysis
536d70
%pom_disable_module morfologik analysis
536d70
popd
536d70
536d70
%if %{with jp_minimal}
536d70
pushd lucene
536d70
%pom_disable_module expressions
536d70
%pom_disable_module icu analysis
536d70
%pom_disable_module kuromoji analysis
536d70
%pom_disable_module phonetic analysis
536d70
%pom_disable_module stempel analysis
536d70
%pom_disable_module nori analysis
536d70
popd
536d70
536d70
%mvn_package :lucene-parent __noinstall
536d70
%mvn_package :lucene-solr-grandparent __noinstall
536d70
%endif
536d70
536d70
# For some reason TestHtmlParser.testTurkish fails when building inside SCLs
536d70
%mvn_build -s -f
536d70
536d70
%install
536d70
%mvn_install
536d70
536d70
# Use the same directory of the main package for subpackage licence and docs
536d70
%global _docdir_fmt %{name}
536d70
536d70
%files -f .mfiles-%{name}-core
536d70
%doc lucene/CHANGES.txt lucene/README.txt
536d70
%doc lucene/MIGRATE.txt lucene/JRE_VERSION_MIGRATION.txt
536d70
%license lucene/LICENSE.txt lucene/NOTICE.txt
536d70
536d70
%files analysis -f .mfiles-%{name}-analysis
536d70
536d70
%files analyzers-smartcn -f .mfiles-%{name}-analyzers-smartcn
536d70
536d70
%files grouping -f .mfiles-%{name}-grouping
536d70
536d70
%files highlighter -f .mfiles-%{name}-highlighter
536d70
536d70
%files join -f .mfiles-%{name}-join
536d70
536d70
%files memory -f .mfiles-%{name}-memory
536d70
536d70
%files misc -f .mfiles-%{name}-misc
536d70
536d70
%files queries -f .mfiles-%{name}-queries
536d70
536d70
%files queryparser -f .mfiles-%{name}-queryparser
536d70
536d70
%files sandbox -f .mfiles-%{name}-sandbox
536d70
536d70
%files backward-codecs -f .mfiles-%{name}-backward-codecs
536d70
536d70
%files codecs -f .mfiles-%{name}-codecs
536d70
536d70
%files classification -f .mfiles-%{name}-classification
536d70
536d70
%files suggest -f .mfiles-%{name}-suggest
536d70
536d70
%files monitor -f .mfiles-%{name}-monitor
536d70
%if %{without jp_minimal}
536d70
536d70
%files parent -f .mfiles-%{name}-parent
536d70
536d70
%files solr-grandparent -f .mfiles-%{name}-solr-grandparent
536d70
536d70
%files expressions -f .mfiles-%{name}-expressions
536d70
536d70
%files analyzers-phonetic -f .mfiles-%{name}-analyzers-phonetic
536d70
536d70
%files analyzers-icu -f .mfiles-%{name}-analyzers-icu
536d70
536d70
%files analyzers-nori -f .mfiles-%{name}-analyzers-nori
536d70
536d70
%files analyzers-kuromoji -f .mfiles-%{name}-analyzers-kuromoji
536d70
536d70
%files analyzers-stempel -f .mfiles-%{name}-analyzers-stempel
536d70
%endif
536d70
536d70
%files javadoc -f .mfiles-javadoc
536d70
%license lucene/LICENSE.txt lucene/NOTICE.txt
536d70
536d70
%changelog
536d70
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 0:8.4.1-5
536d70
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
536d70
536d70
* Wed May 06 2020 Mat Booth <mat.booth@redhat.com> - 0:8.4.1-4
536d70
- Fix jp_minimal mode
536d70
536d70
* Tue May 5 2020 Alexander Kurtakov <akurtako@redhat.com> - 0:8.4.1-3
536d70
- Disable test-framework as its dependency (randomizedtesting) is removed.
536d70
536d70
* Sat Mar 21 2020 Mat Booth <mat.booth@redhat.com> - 0:8.4.1-2
536d70
- Fix deps for minimal mode
536d70
536d70
* Sat Mar 21 2020 Mat Booth <mat.booth@redhat.com> - 0:8.4.1-1
536d70
- Update to latest upstream release
536d70
536d70
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:8.1.1-4
536d70
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
536d70
536d70
* Thu Nov 28 2019 Mat Booth <mat.booth@redhat.com> - 0:8.1.1-3
536d70
- Drop spatial, morfologik, replicator, demo and benchmark modules due to missing deps
536d70
- Fix obsoletes when built in minimal mode
536d70
536d70
* Thu Jun 13 2019 Mat Booth <mat.booth@redhat.com> - 0:8.1.1-2
536d70
- Enable additional module in jp_minimal mode
536d70
536d70
* Wed Jun 12 2019 Mat Booth <mat.booth@redhat.com> - 0:8.1.1-1
536d70
- Update to latest upstream release
536d70
536d70
* Thu Feb 14 2019 Mat Booth <mat.booth@redhat.com> - 0:7.7.0-1
536d70
- Update to latest upstream release
536d70
- Drop deprecated uima analyzers sub-package
536d70
- Added nori Korean analyzers sub-package
536d70
536d70
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0:7.1.0-4
536d70
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
536d70
536d70
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:7.1.0-3
536d70
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
536d70
536d70
* Thu Apr 26 2018 Mat Booth <mat.booth@redhat.com> - 0:7.1.0-2
536d70
- Fix split package information in OSGi metadata
536d70
536d70
* Thu Apr 12 2018 Mat Booth <mat.booth@redhat.com> - 0:7.1.0-1
536d70
- Update to a newer upstream release
536d70
536d70
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:6.1.0-8
536d70
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
536d70
536d70
* Thu Dec 07 2017 Mat Booth <mat.booth@redhat.com> - 0:6.1.0-7
536d70
- Enable more modules in jp_minimal profile, rhbz#1455267
536d70
536d70
* Mon Oct 16 2017 Michael Simacek <msimacek@redhat.com> - 0:6.1.0-6
536d70
- Backport fix for CVE-2017-12629
536d70
536d70
* Thu Sep 21 2017 Mat Booth <mat.booth@redhat.com> - 0:6.1.0-5
536d70
- Rebuild to regenerate OSGi metadata due to objectweb-asm update
536d70
536d70
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:6.1.0-4
536d70
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
536d70
536d70
* Tue Apr 04 2017 Mat Booth <mat.booth@redhat.com> - 0:6.1.0-3
536d70
- Add better OSGi metadata for dealing with core/misc split packages
536d70
- Drop F24-specific hack
536d70
536d70
* Tue Mar 21 2017 Michael Simacek <msimacek@redhat.com> - 0:6.1.0-2
536d70
- Update jp_minimal conditional
536d70
536d70
* Mon Mar 20 2017 Mat Booth <mat.booth@redhat.com> - 0:6.1.0-1
536d70
- Update to lucene 6
536d70
- Add "spatial-extras" subpackage, this decouples dependencies on spatial4j.
536d70
536d70
* Thu Mar 16 2017 Michael Simacek <msimacek@redhat.com> - 0:5.5.0-7
536d70
- Add jp_minimal conditional
536d70
536d70
* Mon Feb 06 2017 Michael Simacek <msimacek@redhat.com> - 0:5.5.0-6
536d70
- Remove buildnumber-plugin
536d70
536d70
* Mon Aug 22 2016 Roman Vais <rvais@redhat.com> - 0:5.5.0-5
536d70
- Removed test dependency macros for lucene demo that caused conflict (duplicity)
536d70
536d70
* Wed Jul 13 2016 Roland Grunberg <rgrunber@redhat.com> - 0:5.5.0-4
536d70
- analyzers-common should have versioned requires on package from core.
536d70
536d70
* Fri Jul 08 2016 Mat Booth <mat.booth@redhat.com> - 0:5.5.0-3
536d70
- Misc module should require core module, the split package
536d70
  causes problems for OSGi consumers
536d70
536d70
* Mon Apr 18 2016 Mat Booth <mat.booth@redhat.com> - 0:5.5.0-2
536d70
- Add missing BR on ant, fixes FTBFS
536d70
536d70
* Wed Feb 24 2016 Michael Simacek <msimacek@redhat.com> - 0:5.5.0-1
536d70
- Update to upstream version 5.5.0
536d70
536d70
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:5.4.1-3
536d70
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
536d70
536d70
* Mon Jan 25 2016 Alexander Kurtakov <akurtako@redhat.com> 0:5.4.1-2
536d70
- Organize Sources numbering.
536d70
- Drop old jpackage header - package has nothing in common anymore.
536d70
- Drop 3+ years old provides/obsoletes.
536d70
- Move old changelog to separate file to ease working with the spec file.
536d70
536d70
* Mon Jan 25 2016 Alexander Kurtakov <akurtako@redhat.com> 0:5.4.1-1
536d70
- Update to upstream 5.4.1 release.
536d70
536d70
* Thu Jan 21 2016 Alexander Kurtakov <akurtako@redhat.com> 0:5.4.0-1
536d70
- Update to upstream 5.4.0 release.
536d70
536d70
* Tue Oct 6 2015 Alexander Kurtakov <akurtako@redhat.com> 0:5.3.1-1
536d70
- Update to upstream 5.3.1 release.
536d70
536d70
* Thu Aug 27 2015 Alexander Kurtakov <akurtako@redhat.com> 0:5.3.0-1
536d70
- Update to upstream 5.3.0 release.
536d70
536d70
* Wed Aug 26 2015 Mat Booth <mat.booth@redhat.com> - 0:5.2.1-4
536d70
- Remove forbidden SCL macros
536d70
536d70
* Wed Jun 24 2015 Alexander Kurtakov <akurtako@redhat.com> 0:5.2.1-3
536d70
- Disable generation of uses clauses in OSGi manifests.
536d70
536d70
* Wed Jun 24 2015 Alexander Kurtakov <akurtako@redhat.com> 0:5.2.1-2
536d70
- Drop old workarounds.
536d70
536d70
* Tue Jun 23 2015 Alexander Kurtakov <akurtako@redhat.com> 0:5.2.1-1
536d70
- Update to upstream 5.2.1.