From aa100509023f8c161b8d4a00d5d0d62c8e2e2cbf Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 16 2015 15:02:59 +0000 Subject: import devtoolset-4-tika-1.5-6.2.el7 --- diff --git a/.devtoolset-4-tika.metadata b/.devtoolset-4-tika.metadata new file mode 100644 index 0000000..034617f --- /dev/null +++ b/.devtoolset-4-tika.metadata @@ -0,0 +1 @@ +f9a3c04dc3d1ce27742d0db7b8c171bbd89063b6 SOURCES/tika-1.5-src.zip diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27e468e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/tika-1.5-src.zip diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/tika-1.4-bouncycastle-1.50.patch b/SOURCES/tika-1.4-bouncycastle-1.50.patch new file mode 100644 index 0000000..b230035 --- /dev/null +++ b/SOURCES/tika-1.4-bouncycastle-1.50.patch @@ -0,0 +1,43 @@ +From 27cdcfe0e2b39fdc3ac0620cfb94e1910ca467bb Mon Sep 17 00:00:00 2001 +From: Michal Srb +Date: Fri, 7 Mar 2014 08:39:06 +0100 +Subject: [PATCH] bouncycastle 1.50 + +--- + .../src/main/java/org/apache/tika/parser/crypto/Pkcs7Parser.java | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/tika-parsers/src/main/java/org/apache/tika/parser/crypto/Pkcs7Parser.java b/tika-parsers/src/main/java/org/apache/tika/parser/crypto/Pkcs7Parser.java +index d66b95e..094659b 100644 +--- a/tika-parsers/src/main/java/org/apache/tika/parser/crypto/Pkcs7Parser.java ++++ b/tika-parsers/src/main/java/org/apache/tika/parser/crypto/Pkcs7Parser.java +@@ -31,6 +31,8 @@ import org.apache.tika.parser.Parser; + import org.bouncycastle.cms.CMSException; + import org.bouncycastle.cms.CMSSignedDataParser; + import org.bouncycastle.cms.CMSTypedStream; ++import org.bouncycastle.operator.OperatorCreationException; ++import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder; + import org.xml.sax.ContentHandler; + import org.xml.sax.SAXException; + +@@ -58,7 +60,7 @@ public class Pkcs7Parser extends AbstractParser { + throws IOException, SAXException, TikaException { + try { + CMSSignedDataParser parser = +- new CMSSignedDataParser(new CloseShieldInputStream(stream)); ++ new CMSSignedDataParser(new JcaDigestCalculatorProviderBuilder().setProvider("BC").build(), new CloseShieldInputStream(stream)); + try { + CMSTypedStream content = parser.getSignedContent(); + if (content == null) { +@@ -77,6 +79,8 @@ public class Pkcs7Parser extends AbstractParser { + } + } catch (CMSException e) { + throw new TikaException("Unable to parse pkcs7 signed data", e); ++ } catch (OperatorCreationException e) { ++ throw new TikaException("Unable to parse pkcs7 signed data", e); + } + } + +-- +1.8.5.3 + diff --git a/SOURCES/tika-1.4-fix-build-deps.patch b/SOURCES/tika-1.4-fix-build-deps.patch new file mode 100644 index 0000000..5ecd4fb --- /dev/null +++ b/SOURCES/tika-1.4-fix-build-deps.patch @@ -0,0 +1,53 @@ +diff -Nru tika-1.4/pom.xml tika-1.4-gil/pom.xml +--- tika-1.4/pom.xml 2013-06-16 10:31:48.000000000 +0200 ++++ tika-1.4-gil/pom.xml 2013-10-10 14:00:01.050417440 +0200 +@@ -194,7 +194,7 @@ + + + org.apache.ant +- ant-nodeps ++ ant + 1.8.1 + + +diff -Nru tika-1.4/tika-parsers/pom.xml tika-1.4-gil/tika-parsers/pom.xml +--- tika-1.4/tika-parsers/pom.xml 2013-06-16 10:33:20.000000000 +0200 ++++ tika-1.4-gil/tika-parsers/pom.xml 2013-10-10 14:01:58.532318716 +0200 +@@ -107,13 +107,13 @@ + problems with encrypted PDFs. --> + + org.bouncycastle +- bcmail-jdk15 +- 1.45 ++ bcmail-jdk16 ++ 1.46 + + + org.bouncycastle +- bcprov-jdk15 +- 1.45 ++ bcprov-jdk16 ++ 1.46 + + + org.apache.poi +@@ -141,8 +141,8 @@ + + + +- org.apache.geronimo.specs +- geronimo-stax-api_1.0_spec ++ javax.xml.stream ++ stax-api + 1.0.1 + + +@@ -152,7 +152,7 @@ + + + org.ow2.asm +- asm-debug-all ++ asm-all + 4.1 + + diff --git a/SOURCES/tika-1.5-metadata-extractor.patch b/SOURCES/tika-1.5-metadata-extractor.patch new file mode 100644 index 0000000..842b9bf --- /dev/null +++ b/SOURCES/tika-1.5-metadata-extractor.patch @@ -0,0 +1,77 @@ +diff -Nru tika-1.5/tika-parsers/pom.xml tika-1.5.metadata-extractor/tika-parsers/pom.xml +--- tika-1.5/tika-parsers/pom.xml 2015-04-22 18:32:55.673585133 +0200 ++++ tika-1.5.metadata-extractor/tika-parsers/pom.xml 2015-04-22 18:31:18.890503541 +0200 +@@ -163,7 +163,7 @@ + + com.drewnoakes + metadata-extractor +- 2.6.2 ++ 2.8.1 + + + de.l3s.boilerpipe +diff -Nru tika-1.5/tika-parsers/src/main/java/org/apache/tika/parser/image/ImageMetadataExtractor.java tika-1.5.metadata-extractor/tika-parsers/src/main/java/org/apache/tika/parser/image/ImageMetadataExtractor.java +--- tika-1.5/tika-parsers/src/main/java/org/apache/tika/parser/image/ImageMetadataExtractor.java 2014-02-09 21:36:28.000000000 +0100 ++++ tika-1.5.metadata-extractor/tika-parsers/src/main/java/org/apache/tika/parser/image/ImageMetadataExtractor.java 2015-04-22 18:28:12.139993992 +0200 +@@ -37,6 +37,7 @@ + import com.drew.imaging.jpeg.JpegMetadataReader; + import com.drew.imaging.jpeg.JpegProcessingException; + import com.drew.imaging.tiff.TiffMetadataReader; ++import com.drew.imaging.tiff.TiffProcessingException; + import com.drew.lang.GeoLocation; + import com.drew.lang.Rational; + import com.drew.metadata.Directory; +@@ -104,6 +105,8 @@ + handle(tiffMetadata); + } catch (MetadataException e) { + throw new TikaException("Can't read TIFF metadata", e); ++ } catch (TiffProcessingException e) { ++ throw new TikaException("Can't processing TIFF metadata", e); + } + } + +@@ -217,12 +220,12 @@ + //Exif.Image.ImageWidth Short 1 100 + //Exif.Image.ImageLength Short 1 75 + // and the values are found in "Thumbnail Image Width" (and Height) from Metadata Extractor +- set(directory, metadata, ExifThumbnailDirectory.TAG_THUMBNAIL_IMAGE_WIDTH, Metadata.IMAGE_WIDTH); +- set(directory, metadata, JpegDirectory.TAG_JPEG_IMAGE_WIDTH, Metadata.IMAGE_WIDTH); +- set(directory, metadata, ExifThumbnailDirectory.TAG_THUMBNAIL_IMAGE_HEIGHT, Metadata.IMAGE_LENGTH); +- set(directory, metadata, JpegDirectory.TAG_JPEG_IMAGE_HEIGHT, Metadata.IMAGE_LENGTH); ++ set(directory, metadata, ExifThumbnailDirectory.TAG_IMAGE_WIDTH, Metadata.IMAGE_WIDTH); ++ set(directory, metadata, JpegDirectory.TAG_IMAGE_WIDTH, Metadata.IMAGE_WIDTH); ++ set(directory, metadata, ExifThumbnailDirectory.TAG_IMAGE_HEIGHT, Metadata.IMAGE_LENGTH); ++ set(directory, metadata, JpegDirectory.TAG_IMAGE_HEIGHT, Metadata.IMAGE_LENGTH); + // Bits per sample, two methods of extracting, exif overrides jpeg +- set(directory, metadata, JpegDirectory.TAG_JPEG_DATA_PRECISION, Metadata.BITS_PER_SAMPLE); ++ set(directory, metadata, JpegDirectory.TAG_DATA_PRECISION, Metadata.BITS_PER_SAMPLE); + set(directory, metadata, ExifSubIFDDirectory.TAG_BITS_PER_SAMPLE, Metadata.BITS_PER_SAMPLE); + // Straightforward + set(directory, metadata, ExifSubIFDDirectory.TAG_SAMPLES_PER_PIXEL, Metadata.SAMPLES_PER_PIXEL); +@@ -242,8 +245,8 @@ + return directoryType == JpegCommentDirectory.class; + } + public void handle(Directory directory, Metadata metadata) throws MetadataException { +- if (directory.containsTag(JpegCommentDirectory.TAG_JPEG_COMMENT)) { +- metadata.add(TikaCoreProperties.COMMENTS, directory.getString(JpegCommentDirectory.TAG_JPEG_COMMENT)); ++ if (directory.containsTag(JpegCommentDirectory.TAG_COMMENT)) { ++ metadata.add(TikaCoreProperties.COMMENTS, directory.getString(JpegCommentDirectory.TAG_COMMENT)); + } + } + } +@@ -362,11 +365,11 @@ + if(directory.containsTag(ExifIFD0Directory.TAG_RESOLUTION_UNIT)) { + metadata.set(Metadata.RESOLUTION_UNIT, directory.getDescription(ExifIFD0Directory.TAG_RESOLUTION_UNIT)); + } +- if(directory.containsTag(ExifThumbnailDirectory.TAG_THUMBNAIL_IMAGE_WIDTH)) { +- metadata.set(Metadata.IMAGE_WIDTH, directory.getDescription(ExifThumbnailDirectory.TAG_THUMBNAIL_IMAGE_WIDTH)); ++ if(directory.containsTag(ExifThumbnailDirectory.TAG_IMAGE_WIDTH)) { ++ metadata.set(Metadata.IMAGE_WIDTH, directory.getDescription(ExifThumbnailDirectory.TAG_IMAGE_WIDTH)); + } +- if(directory.containsTag(ExifThumbnailDirectory.TAG_THUMBNAIL_IMAGE_HEIGHT)) { +- metadata.set(Metadata.IMAGE_LENGTH, directory.getDescription(ExifThumbnailDirectory.TAG_THUMBNAIL_IMAGE_HEIGHT)); ++ if(directory.containsTag(ExifThumbnailDirectory.TAG_IMAGE_HEIGHT)) { ++ metadata.set(Metadata.IMAGE_LENGTH, directory.getDescription(ExifThumbnailDirectory.TAG_IMAGE_HEIGHT)); + } + } + /** diff --git a/SPECS/tika.spec b/SPECS/tika.spec new file mode 100644 index 0000000..5d744c8 --- /dev/null +++ b/SPECS/tika.spec @@ -0,0 +1,331 @@ +%{?scl:%scl_package tika} +%{!?scl:%global pkg_name %{name}} +%{?java_common_find_provides_and_requires} + +# Conditionals to help breaking tika <-> vorbis-java-tika dependency cycle +%if 0%{?rhel} +%bcond_without vorbis_tika +# Disable only for now +%bcond_with tika_parsers +%bcond_without tika_app +%endif + +Name: %{?scl_prefix}tika +Version: 1.5 +Release: 6.2%{?dist} +Summary: A content analysis toolkit +License: ASL 2.0 +Url: http://tika.apache.org/ +Source0: http://www.apache.org/dist/tika/%{pkg_name}-%{version}-src.zip +# Fix stax-api gId:aId +# Replace unavailable org.ow2.asm:asm-debug-all:4.1 +# Replace ant-nodeps with ant +# Fix bouncycastle aId +Patch0: %{pkg_name}-1.4-fix-build-deps.patch +Patch1: %{pkg_name}-1.4-bouncycastle-1.50.patch +Patch2: %{pkg_name}-1.5-metadata-extractor.patch + +BuildRequires: %{?scl_prefix_maven}mvn(biz.aQute:bndlib) +BuildRequires: %{?scl_prefix_java_common}mvn(org.apache.ant:ant) +BuildRequires: %{?scl_prefix_maven}mvn(org.osgi:org.osgi.compendium) +BuildRequires: %{?scl_prefix_maven}mvn(org.osgi:org.osgi.core) + +%if %{without vorbis_tika} +BuildRequires: mvn(org.gagravarr:vorbis-java-tika) +%endif + +%if %{without tika_parsers} +BuildRequires: %{?scl_prefix_java_common}apache-commons-logging +BuildRequires: %{?scl_prefix_java_common}mvn(commons-codec:commons-codec) +BuildRequires: %{?scl_prefix_java_common}mvn(javax.xml.stream:stax-api) +BuildRequires: %{?scl_prefix_java_common}mvn(org.apache.commons:commons-compress) +BuildRequires: %{?scl_prefix_java_common}mvn(org.ow2.asm:asm-all:5) +BuildRequires: %{?scl_prefix}mvn(rome:rome) +%if %{without tika_app} +BuildRequires: %{?scl_prefix_java_common}mvn(com.google.code.gson:gson) +BuildRequires: mvn(log4j:log4j:1.2.17) +BuildRequires: mvn(org.slf4j:slf4j-log4j12) +%endif +%endif + +%if 0 +# tika-server deps +BuildRequires: mvn(net.sf.opencsv:opencsv:2.0) +BuildRequires: mvn(org.apache.cxf:cxf-rt-frontend-jaxrs:2.6.1) +BuildRequires: mvn(org.apache.cxf:cxf-rt-transports-http-jetty:2.6.1) +# tika-parser deps +BuildRequires: mvn(com.googlecode.mp4parser:mp4parser-project:1.0-RC-1) +BuildRequires: mvn(com.googlecode.mp4parser:isoparser:1.0-RC-1) +# tika-xmp +BuildRequires: mvn(org.apache.felix:maven-scr-plugin:1.7.4) +%endif + +# Test deps +BuildRequires: %{?scl_prefix_java_common}mvn(junit:junit) +BuildRequires: %{?scl_prefix}mvn(org.mockito:mockito-core) +BuildRequires: %{?scl_prefix_java_common}mvn(xml-apis:xml-apis) + +BuildRequires: %{?scl_prefix_java_common}maven-local +BuildRequires: %{?scl_prefix_maven}maven-failsafe-plugin +BuildRequires: %{?scl_prefix_maven}maven-plugin-bundle +BuildRequires: %{?scl_prefix_maven}maven-remote-resources-plugin +BuildRequires: %{?scl_prefix_maven}maven-site-plugin + +BuildArch: noarch + +%description +The Apache Tika toolkit detects and extracts meta-data and +structured text content from various documents using existing +parser libraries. + +%if %{without tika_parsers} + +%package parsers +Summary: Apache Tika parsers + +%description parsers +Apache Tika parsers implementation that matches the +type of the document, once it is known, using +Mime Type detection. + +%package java7 +Summary: Apache Tika Java-7 Components + +%description java7 +Java-7 reliant components, including FileTypeDetector +implementations. + +%if %{without tika_app} + +%package app +Summary: Apache Tika Application +Requires: mvn(log4j:log4j:1.2.17) + +%description app +Apache Tika standalone application. +%endif +%endif + +%package javadoc +Summary: Javadoc for %{pkg_name} + +%description javadoc +This package contains javadoc for %{pkg_name}. + +%prep +%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} +set -e -x +%setup -n %{pkg_name}-%{version} -q +# Cleanup +find . -name '*.jar' -delete +find . -name '*.class' -delete +# Remove unwanted test resources +rm -r %{pkg_name}-parsers/src/test/resources/test-documents/testLinux-*-* +rm -r %{pkg_name}-parsers/src/test/resources/test-documents/testFreeBSD-* +rm -r %{pkg_name}-parsers/src/test/resources/test-documents/testSolaris-* +rm -r %{pkg_name}-parsers/src/test/resources/test-documents/*.ibooks +rm -r %{pkg_name}-parsers/src/test/resources/test-documents/*.numbers +rm -r %{pkg_name}-parsers/src/test/resources/test-documents/*.pages +rm -r %{pkg_name}-parsers/src/test/resources/test-documents/*.key +rm -r %{pkg_name}-parsers/src/test/resources/test-documents/*.war +rm -r %{pkg_name}-parsers/src/test/resources/test-documents/*.wma +rm -r %{pkg_name}-parsers/src/test/resources/test-documents/*.wmv +find . -name '*.7z' -delete +find . -name '*.ar' -delete +find . -name '*.cpio' -delete +find . -name '*.ear' -delete +find . -name '*.exe' -delete +find . -name '*.mp*' -delete +find . -name '*.tbz2' -delete +find . -name '*.tgz' -delete +find . -name '*.zip' -delete +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%pom_disable_module %{pkg_name}-bundle +%pom_disable_module %{pkg_name}-server +%pom_disable_module %{pkg_name}-xmp +# Unavailable plugins +%pom_remove_plugin org.codehaus.mojo:clirr-maven-plugin %{pkg_name}-core +%pom_remove_plugin org.apache.felix:maven-scr-plugin %{pkg_name}-xmp +%pom_remove_plugin org.apache.felix:maven-scr-plugin %{pkg_name}-java7 + +# Require com.drewnoakes:metadata-extractor:2.6.2 and fedora metadata-extractor pkg is too old +# see https://bugzilla.redhat.com/show_bug.cgi?id=947457 +%pom_xpath_set "pom:project/pom:dependencies/pom:dependency[pom:artifactId='metadata-extractor']/pom:version" 2 %{pkg_name}-parsers +%pom_xpath_set "pom:project/pom:dependencies/pom:dependency[pom:artifactId='asm-all']/pom:version" 5.0.3 %{pkg_name}-parsers +# Disable vorbis-java-tika support, cause circular dependency +%if %{with vorbis_tika} +%pom_remove_dep :vorbis-java-tika %{pkg_name}-parsers +%endif + +%if %{with tika_parsers} +%pom_disable_module %{pkg_name}-parsers +%else +%if %{with tika_app} +%pom_disable_module %{pkg_name}-app +%else +# No bundled libraries are shipped +%pom_remove_plugin :maven-shade-plugin %{pkg_name}-app +%pom_remove_plugin :maven-antrun-plugin %{pkg_name}-app +%endif +%endif + +# Unavailable build dep com.googlecode.mp4parser:isoparser +# MP4 is non-free remove support for it +%pom_remove_dep com.googlecode.mp4parser:isoparser %{pkg_name}-parsers +rm -r %{pkg_name}-parsers/src/main/java/org/apache/tika/parser/mp4/MP4Parser.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/mp4/MP4ParserTest.java + +# This test require network +rm %{pkg_name}-core/src/test/java/org/apache/tika/mime/MimeDetectionTest.java +# These test fails for unavailable deps: com.googlecode.mp4parser:isoparser and org.gagravarr:vorbis-java-tika +rm -r %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/mail/RFC822ParserTest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/mbox/MboxParserTest.java +rm -r %{pkg_name}-parsers/src/test/java/org/apache/tika/detect/TestContainerAwareDetector.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/AutoDetectParserTest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/asm/ClassParserTest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/pkg/Bzip2ParserTest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/pkg/GzipParserTest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/pkg/TarParserTest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/pkg/ZipParserTest.java +rm -r %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/image/ImageMetadataExtractorTest.java +# Fails for unavailable test resources +rm -r %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/microsoft/ProjectParserTest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/mp3/Mp3ParserTest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/iwork/IWorkParserTest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/pkg/ArParserTest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/executable/ExecutableParserTest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/ibooks/iBooksParserTest.java \ + %{pkg_name}-app/src/test/java/org/apache/tika/cli/TikaCLITest.java \ + %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/pdf/PDFParserTest.java + +# NullPointerException: null +rm -r %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/fork/ForkParserIntegrationTest.java +# NoClassDefFoundError: org/w3c/dom/ElementTraversal +%pom_add_dep xml-apis:xml-apis::test %{pkg_name}-parsers +%pom_add_dep org.apache.commons:commons-logging:1.5 %{pkg_name}-parsers + +# ComparisonFailure: Date/Time Original for when the photo was taken, unspecified time zone expected:<2009-08-11T[09]:09:45> but was:<2009-08-11T[11]:09:45> +rm -r %{pkg_name}-parsers/src/test/java/org/apache/tika/parser/jpeg/JpegParserTest.java + +#Remove deps required by parsers other than epub +%pom_remove_dep org.apache.felix:org.apache.felix.scr.annotations %{pkg_name}-parsers +%pom_remove_dep edu.ucar:netcdf %{pkg_name}-parsers +%pom_remove_dep org.apache.james:apache-mime4j-core %{pkg_name}-parsers +%pom_remove_dep org.apache.james:apache-mime4j-dom %{pkg_name}-parsers +%pom_remove_dep org.apache.pdfbox:pdfbox %{pkg_name}-parsers +%pom_remove_dep org.bouncycastle:bcmail-jdk16 %{pkg_name}-parsers +%pom_remove_dep org.apache.poi:poi %{pkg_name}-parsers +%pom_remove_dep org.apache.poi:poi-scratchpad %{pkg_name}-parsers +%pom_remove_dep org.apache.poi:poi-ooxml %{pkg_name}-parsers +%pom_remove_dep org.ccil.cowan.tagsoup:tagsoup %{pkg_name}-parsers +%pom_remove_dep com.drewnoakes:metadata-extractor %{pkg_name}-parsers +%pom_remove_dep de.l3s.boilerpipe:boilerpipe %{pkg_name}-parsers +%pom_remove_dep org.gagravarr:vorbis-java-core %{pkg_name}-parsers +%pom_remove_dep com.googlecode.juniversalchardet:juniversalchardet %{pkg_name}-parsers +%pom_remove_dep org.bouncycastle:bcprov-jdk16 %{pkg_name}-parsers +%pom_remove_dep org.slf4j:slf4j-log4j12 %{pkg_name}-parsers +%pom_remove_dep com.uwyn:jhighlight %{pkg_name}-parsers +rm -r tika-parsers/src/main/java/org/apache/tika/parser/{chm,code,crypto,dwg,executable,font,hdf,html,image,jpeg,mail,microsoft,mp3,mp4,netcdf,pdf,pkg,prt,txt} +%{?scl:EOF} + + +%build +%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} +# skip tests for now because there are test failures: +# Tests which use cglib fail because of incompatibility with asm4 +# Test fails for unavailable build deps: com.googlecode.mp4parser:isoparser +%mvn_package :%{pkg_name} %{pkg_name} +%mvn_package :%{pkg_name}-core %{pkg_name} +%mvn_package :%{pkg_name}-parent %{pkg_name} +%mvn_build -f -s -- -Dproject.build.sourceEncoding=UTF-8 +%{?scl:EOF} + + +%install +%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"} +%mvn_install + +%if %{without tika_app} +%jpackage_script org.apache.tika.cli.TikaCLI "" "" %{pkg_name}:google-gson:commons-io:commons-logging:log4j12-1.2.17:metadata-extractor2-2:juniversalchardet:apache-commons-codec:boilerpipe:thredds/netcdf:thredds/udunits:bea-stax-api:commons-compress:felix/org.apache.felix.scr.annotations:apache-mime4j/core:apache-mime4j/dom:pdfbox:poi/poi:poi/poi-scratchpad:poi/poi-ooxml:bcmail:bcprov:tagsoup:objectweb-asm4/asm-all:rome:fontbox:vorbis-java:dom4j:xmlbeans:poi/poi-ooxml-schemas:jempbox:xmpcore:slf4j/api:slf4j/log4j12:jdom:jdom2 %{pkg_name}-app true +%endif +%{?scl:EOF} + + +%files -f .mfiles-%{pkg_name} +%dir %{_javadir}/%{pkg_name} +%dir %{_mavenpomdir}/%{pkg_name} +%doc CHANGES.txt HEADER.txt KEYS README.txt +%doc LICENSE.txt NOTICE.txt + +%if %{without tika_parsers} + +%files parsers -f .mfiles-%{pkg_name}-parsers +%doc LICENSE.txt NOTICE.txt + +%files java7 -f .mfiles-%{pkg_name}-java7 +%doc LICENSE.txt NOTICE.txt + +%if %{without tika_app} + +%files app -f .mfiles-%{pkg_name}-app +%doc LICENSE.txt NOTICE.txt +%{_bindir}/%{pkg_name}-app +%endif +%endif + +%files javadoc -f .mfiles-javadoc +%doc LICENSE.txt NOTICE.txt + +%changelog +* Thu Jul 16 2015 Mat Booth - 1.5-6.2 +- Fix unowned directories + +* Tue Jul 07 2015 Mat Booth - 1.5-6.1 +- Import latest from Fedora + +* Fri Jun 19 2015 Fedora Release Engineering - 1.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Apr 22 2015 gil cattaneo 1.5-5 +- rebuilt with new metadata-extractor2.8.1 + +* Mon Apr 20 2015 gil cattaneo 1.5-4 +- rebuilt with new metadata-extractor2.7.2 + +* Fri Mar 06 2015 gil cattaneo 1.5-3 +- rebuilt with new jhighlight + +* Mon Feb 16 2015 gil cattaneo 1.5-2 +- introduce license macro + +* Tue Jul 01 2014 gil cattaneo 1.5-1 +- update to 1.5 + +* Wed Jun 11 2014 Fabrice Bellet 1.4-7 +- enable app module, RHBZ#1109072 + +* Sun Jun 08 2014 Fedora Release Engineering - 1.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Mar 07 2014 Michal Srb - 1.4-5 +- Port to bouncycastle 1.50 + +* Tue Nov 19 2013 gil cattaneo 1.4-4 +- enable vorbis-java-tika support + +* Wed Oct 23 2013 Mikolaj Izdebski - 1.4-3 +- Rebuild to regenerate broken POMs +- Related: rhbz#1021484 + +* Mon Oct 21 2013 gil cattaneo 1.4-2 +- enable parsers and xpm modules + +* Thu Aug 29 2013 gil cattaneo 1.4-1 +- update to 1.4 + +* Tue Oct 23 2012 gil cattaneo 1.2-1 +- initial rpm