Blame SPECS/lucene.spec

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