Name: solr3
Version: 3.6.2
Release: 13%{?dist}
Summary: Apache Solr
License: ASL 2.0
Url: http://lucene.apache.org/solr/
# wget http://archive.apache.org/dist/lucene/solr/3.6.2/apache-solr-3.6.2-src.tgz
# tar -xf apache-solr-3.6.2-src.tgz apache-solr-3.6.2/solr/
# rm -rf apache-solr-3.6.2/solr/lib
# find apache-solr-3.6.2/solr/ -name "*.jar" -delete
# find apache-solr-3.6.2/solr/ -name "*.class" -delete
# tar -cvjf apache-solr-3.6.2.tar.gz apache-solr-3.6.2/solr/
Source0: apache-solr-%{version}.tar.gz
Source1: https://repository.jboss.org/nexus/service/local/repositories/central/content/org/apache/lucene/lucene-solr-grandparent/%{version}/lucene-solr-grandparent-%{version}.pom
Source2: https://repository.jboss.org/nexus/service/local/repositories/central/content/org/apache/solr/solr-parent/%{version}/solr-parent-%{version}.pom
Source3: https://repository.jboss.org/nexus/service/local/repositories/central/content/org/apache/solr/solr-core/%{version}/solr-core-%{version}.pom
Source4: https://repository.jboss.org/nexus/service/local/repositories/central/content/org/apache/solr/solr-solrj/%{version}/solr-solrj-%{version}.pom
Source10: https://repository.jboss.org/nexus/service/local/repositories/central/content/org/apache/solr/solr-analysis-extras/%{version}/solr-analysis-extras-%{version}.pom
Source20: solr-contrib.pom
BuildRequires: lucene3
BuildRequires: lucene3-contrib
BuildRequires: maven-local
BuildRequires: maven-plugin-build-helper
BuildRequires: woodstox-core
BuildRequires: apache-commons-fileupload
BuildRequires: icu4j
BuildRequires: jcl-over-slf4j
# tmp, see below
BuildRequires: xmlstarlet
BuildRequires: regexp
BuildRequires: buildnumber-maven-plugin
BuildRequires: maven-plugin-bundle
BuildArch: noarch
%description
Solr is the popular, blazing fast open source enterprise search platform from
the Apache LuceneTM project. Its major features include powerful full-text
search, hit highlighting, faceted search, near real-time indexing, dynamic
clustering, database integration, rich document (e.g., Word, PDF) handling, and
geospatial search. Solr is highly reliable, scalable and fault tolerant,
providing distributed indexing, replication and load-balanced querying,
automated failover and recovery, centralized configuration and more. Solr
powers the search and navigation features of many of the world's largest
internet sites.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains the API documentation for %{name}.
%prep
# Unpack manually only the solr directory
tar -xf %{SOURCE0} apache-solr-%{version}/solr
%setup -D -T -n apache-solr-%{version}
mkdir parent
mv solr/* .
rm -rf solr
cp %{SOURCE1} parent/pom.xml
# Gmaven is retired
%pom_remove_plugin ":gmaven-plugin" parent/pom.xml
# Make it build
%pom_remove_plugin ":maven-enforcer-plugin" parent/pom.xml
cp %{SOURCE2} pom.xml
# Make sure the relative path is valid
sed -i "s|../pom.xml|parent/pom.xml|" pom.xml
# Disable test deps
%pom_xpath_remove "pom:dependencies/pom:dependency[pom:scope = 'test']"
# Disable modules
%pom_disable_module webapp
%pom_disable_module test-framework
# Copy POMs
cp %{SOURCE3} core/pom.xml
cp %{SOURCE4} solrj/pom.xml
cp %{SOURCE10} contrib/analysis-extras/pom.xml
cp %{SOURCE20} contrib/pom.xml
%pom_xpath_remove "pom:build/pom:directory" pom.xml
%pom_xpath_remove "pom:build/pom:directory" parent/pom.xml
for m in core contrib/analysis-extras solrj; do
%pom_xpath_remove "pom:build/pom:directory" ${m}/pom.xml
%pom_xpath_remove "pom:build/pom:outputDirectory" ${m}/pom.xml
done
# Remove Jetty support
%pom_remove_dep "org.mortbay.jetty:" core/pom.xml
rm core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
# Use proper woodstox aid
sed -i "s|wstx-asl|woodstox-core-asl|" solrj/pom.xml
%mvn_compat_version : %{version} 3
%build
%mvn_build -f
%install
%mvn_install
# Worakround for https://bugzilla.redhat.com/show_bug.cgi?id=1019670
#for aid in solr-core solr-solrj; do
# xmlstarlet ed -L -s "dependencyMap/autoRequires[artifactId = '${aid}']" -t elem -n version -v %{version} %{buildroot}%{_mavendepmapfragdir}/solr3.xml
#done
%files -f .mfiles
%doc README.txt
%license LICENSE.txt NOTICE.txt
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt NOTICE.txt
%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Jun 20 2016 gil cattaneo <puntogil@libero.it> 3.6.2-12
- add missing build requires: buildnumber-maven-plugin
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sat Aug 15 2015 gil cattaneo <puntogil@libero.it> 3.6.2-10
- fix FTBFS rhbz#1239659
- introduce license macro
- fix some rpmlint problem
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Jun 18 2014 Marek Goldmann <mgoldman@redhat.com> - 3.6.2-8
- The xmvn workaround should not be required anymore, but I'm commenting it out
for now
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Apr 16 2014 Marek Goldmann <mgoldman@redhat.com> - 3.6.2-6
- Use lucene3 compat package in Fedora 21+
* Thu Oct 17 2013 Marek Goldmann <mgoldman@redhat.com> - 3.6.2-5
- Added missing question mark to dist tag
- Removing unnecessary files from tarball at the creation time
* Wed Oct 16 2013 Marek Goldmann <mgoldman@redhat.com> - 3.6.2-4
- Now using pom macros to do the changes
- Slim down the src distribution
* Wed Oct 16 2013 Marek Goldmann <mgoldman@redhat.com> - 3.6.2-3
- Fix the self-requires issue, RHBZ#1019670
* Tue Oct 15 2013 Marek Goldmann <mgoldman@redhat.com> - 3.6.2-2
- Make this a compat package
* Wed Oct 09 2013 Marek Goldmann <mgoldman@redhat.com> - 3.6.2-1
- Initial import