From 5e6d49c6a7faa7c6396995b9a2772c4369e0554f Mon Sep 17 00:00:00 2001 From: gil Date: Sep 02 2015 09:08:52 +0000 Subject: build fix --- diff --git a/.gitignore b/.gitignore index 3464040..20da55f 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,10 @@ /poi-ooxml-schemas-3.12.pom /poi-scratchpad-3.12.pom /poi-src-3.12-20150511.tar.gz +/XAdESv141.xsd +/XAdES.xsd +/xmldsig-core-schema.xsd +/dcmitype.xsd +/dcterms.xsd +/dc.xsd +/Office%20Open%20XML%201st%20edition%20Part%202%20(PDF).zip diff --git a/apache-poi.spec b/apache-poi.spec index 70c1ce5..8ebcfc5 100644 --- a/apache-poi.spec +++ b/apache-poi.spec @@ -1,46 +1,62 @@ %global reldate 20150511 %global rcver %{nil} -Name: apache-poi -Version: 3.12 -Release: 1%{?dist} -Summary: The Java API for Microsoft Documents -License: ASL 2.0 -URL: http://poi.apache.org/ -Source0: http://www.apache.org/dist/poi/release/src/poi-src-%{version}-%{reldate}.tar.gz -#Source0: http://www.apache.org/dist/poi/dev/src/poi-src-%%{version}%%{?rcver}-%%{reldate}.tar.gz -Source1: http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%204%20(PDF).zip -Source2: http://repo2.maven.org/maven2/org/apache/poi/poi/%{version}/poi-%{version}.pom -Source3: http://repo2.maven.org/maven2/org/apache/poi/poi-examples/%{version}/poi-examples-%{version}.pom -Source4: http://repo2.maven.org/maven2/org/apache/poi/poi-excelant/%{version}/poi-excelant-%{version}.pom -Source5: http://repo2.maven.org/maven2/org/apache/poi/poi-ooxml/%{version}/poi-ooxml-%{version}.pom -Source6: http://repo2.maven.org/maven2/org/apache/poi/poi-ooxml-schemas/%{version}/poi-ooxml-schemas-%{version}.pom -Source7: http://repo2.maven.org/maven2/org/apache/poi/poi-scratchpad/%{version}/poi-scratchpad-%{version}.pom -#Force compile of xsds if disconnected -Patch1: %{name}-compile-xsds.patch -Patch2: %{name}-build.patch - -BuildArch: noarch +Name: apache-poi +Version: 3.12 +Release: 2%{?dist} +Summary: The Java API for Microsoft Documents +# ASLv2 + GPLv3 src/resources/scratchpad/org/apache/poi/hdgf/chunks_parse_cmds.tbl +# https://bugzilla.redhat.com/show_bug.cgi?id=1146670#c13 +License: ASL 2.0 and (CC-BY and CC-BY-SA and W3C) and GPLv3 +URL: http://poi.apache.org/ +Source0: http://www.apache.org/dist/poi/release/src/poi-src-%{version}-%{reldate}.tar.gz +#Source0: http://www.apache.org/dist/poi/dev/src/poi-src-%%{version}%%{?rcver}-%%{reldate}.tar.gz +# Creative Commons license 4.0 (Attribution-ShareAlike) +Source1: http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%204%20(PDF).zip +Source2: http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%202%20(PDF).zip +# Creative Commons Attribution 3.0 License +Source3: http://dublincore.org/schemas/xmls/qdc/2003/04/02/dc.xsd +Source4: http://dublincore.org/schemas/xmls/qdc/2003/04/02/dcterms.xsd +Source5: http://dublincore.org/schemas/xmls/qdc/2003/04/02/dcmitype.xsd +# W3C +Source6: http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd +# http://www.etsi.org/index.php/terms-of-use +# see https://bz.apache.org/bugzilla/show_bug.cgi?id=57862 +Source7: http://uri.etsi.org/01903/v1.3.2/XAdES.xsd +Source8: http://uri.etsi.org/01903/v1.4.1/XAdESv141.xsd + +Source9: http://repo2.maven.org/maven2/org/apache/poi/poi/%{version}/poi-%{version}.pom +Source10: http://repo2.maven.org/maven2/org/apache/poi/poi-examples/%{version}/poi-examples-%{version}.pom +Source11: http://repo2.maven.org/maven2/org/apache/poi/poi-excelant/%{version}/poi-excelant-%{version}.pom +Source12: http://repo2.maven.org/maven2/org/apache/poi/poi-ooxml/%{version}/poi-ooxml-%{version}.pom +Source13: http://repo2.maven.org/maven2/org/apache/poi/poi-ooxml-schemas/%{version}/poi-ooxml-schemas-%{version}.pom +Source14: http://repo2.maven.org/maven2/org/apache/poi/poi-scratchpad/%{version}/poi-scratchpad-%{version}.pom -BuildRequires: jpackage-utils -BuildRequires: java-devel >= 1:1.6.0 -BuildRequires: ant-junit -BuildRequires: dom4j -BuildRequires: apache-commons-logging -BuildRequires: junit +#Force compile of xsds if disconnected +Patch1: %{name}-compile-xsds.patch +Patch2: %{name}-build.patch + +BuildArch: noarch + +BuildRequires: jacoco +BuildRequires: javapackages-local +BuildRequires: mvn(commons-codec:commons-codec) +BuildRequires: mvn(commons-logging:commons-logging) +BuildRequires: mvn(dom4j:dom4j) +BuildRequires: mvn(junit:junit) +BuildRequires: mvn(log4j:log4j:1.2.17) +BuildRequires: mvn(org.apache.ant:ant-junit) +BuildRequires: mvn(org.apache.santuario:xmlsec) >= 2.0.1 +BuildRequires: mvn(org.apache.xmlbeans:xmlbeans) +BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on) +BuildRequires: mvn(org.bouncycastle:bcprov-jdk15on) +BuildRequires: mvn(org.hamcrest:hamcrest-core) +BuildRequires: mvn(org.ow2.asm:asm-all) +BuildRequires: mvn(org.slf4j:slf4j-api) #Fonts for testing -BuildRequires: fontconfig liberation-sans-fonts liberation-serif-fonts -BuildRequires: jacoco -BuildRequires: log4j12 -BuildRequires: xmlbeans -BuildRequires: hamcrest - -Requires: jpackage-utils -Requires: java >= 1:1.6.0 -Requires: dom4j -Requires: apache-commons-logging -Requires: log4j12 -Requires: xmlbeans +BuildRequires: fontconfig liberation-sans-fonts liberation-serif-fonts + +Obsoletes: %{name}-manual <= %{version}-%{release} %description The Apache POI Project's mission is to create and maintain Java APIs for @@ -78,28 +94,41 @@ Summary: Javadoc for %{name} %description javadoc This package contains the API documentation for %{name}. -%package manual -Summary: Manual for %{name} -Requires: %{name}-javadoc = %{version}-%{release} - -%description manual -The manual for %{name}. - %prep %setup -q -n poi-%{version}%{?rcver} %patch1 -p1 -b .compile-xsds %patch2 -p1 -b .build + find -name '*.class' -delete find -name '*.jar' -delete + +# Disable java8doc doclint +sed -i 's|additionalparam="-notimestamp"|additionalparam="-notimestamp -Xdoclint:none"|' build.xml + mkdir lib ooxml-lib -build-jar-repository -s -p lib ant commons-codec commons-logging jacoco junit hamcrest/core +build-jar-repository -s -p lib ant commons-codec commons-logging jacoco hamcrest/core junit bcprov bcpkix objectweb-asm/asm-all xmlsec slf4j/slf4j-api ln -sf $(build-classpath log4j-1.2.17) lib/log4j.jar build-jar-repository -s -p ooxml-lib dom4j xmlbeans/xbean #Unpack the XMLSchema pushd ooxml-lib unzip "%SOURCE1" OfficeOpenXML-XMLSchema.zip +unzip "%SOURCE2" OpenPackagingConventions-XMLSchema.zip +cp -p %SOURCE3 . +cp -p %SOURCE4 . +cp -p %SOURCE5 . +cp -p %SOURCE6 . +cp -p %SOURCE7 . +cp -p %SOURCE8 . popd +cp -p %SOURCE11 . +%pom_xpath_inject "pom:dependencies/pom:dependency[pom:artifactId ='ant']" " +provided" poi-excelant-%{version}.pom + +%mvn_file org.apache.poi:poi poi/%{name} poi/poi +for m in examples excelant ooxml ooxml-schemas scratchpad;do +%mvn_file org.apache.poi:poi-${m} poi/%{name}-${m} poi/poi-${m} +done %build cat > build.properties <<'EOF' @@ -112,38 +141,26 @@ main.hamcrest.jar=lib/hamcrest_core.jar ooxml.dom4j.jar=ooxml-lib/dom4j.jar ooxml.xmlbeans23.jar=ooxml-lib/xmlbeans_xbean.jar ooxml.xmlbeans26.jar=ooxml-lib/xmlbeans_xbean.jar +dsig.xmlsec.jar=lib/xmlsec.jar +dsig.bouncycastle-prov.jar=lib/bcprov.jar +dsig.bouncycastle-pkix.jar=lib/bcpkix.jar +dsig.sl4j-api.jar=lib/slf4j_slf4j-api.jar +asm.jar=lib/objectweb-asm_asm-all.jar disconnected=1 DSTAMP=%{reldate} EOF -export ANT_OPTS="-Xmx768m" -ant -propertyfile build.properties compile-ooxml-xsds jar +export ANT_OPTS="-Xmx768m" +ant -propertyfile build.properties compile-ooxml-xsds jar javadocs %install -mkdir -p $RPM_BUILD_ROOT%{_javadir}/poi -mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir} -cd build/dist -for jar in *.jar -do - jarname=${jar/-%{version}*.jar/} - cp -p ${jar} $RPM_BUILD_ROOT%{_javadir}/poi/apache-${jarname}.jar - ln -s apache-${jarname}.jar $RPM_BUILD_ROOT%{_javadir}/poi/${jarname}.jar - #pom - cp -p $RPM_SOURCE_DIR/${jarname}-%{version}*.pom \ - $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.poi-${jarname}.pom - %add_maven_depmap JPP.poi-${jarname}.pom poi/${jarname}.jar +%mvn_artifact $RPM_SOURCE_DIR/poi-%{version}.pom build/dist/poi-%{version}-%{reldate}.jar +%mvn_artifact poi-excelant-%{version}.pom build/dist/poi-excelant-%{version}-%{reldate}.jar +for m in examples ooxml ooxml-schemas scratchpad;do +%mvn_artifact $RPM_SOURCE_DIR/poi-${m}-%{version}.pom build/dist/poi-${m}-%{version}-%{reldate}.jar done -cd - - -#javadoc -mkdir -p $RPM_BUILD_ROOT%{_javadocdir} -cp -pr docs/apidocs $RPM_BUILD_ROOT%{_javadocdir}/%{name} -#Don't copy for manual -rm -rf docs/apidocs - -#manual - Link to javadoc location -ln -s ../../javadoc/%{name} docs/apidocs +%mvn_install -J build/tmp/site/build/site/apidocs %check # To enable 8-bit character tests @@ -151,22 +168,19 @@ export LANG=en_US.UTF-8 # Ignore test failures for now ant -propertyfile build.properties test || : - -%files -f build/dist/.mfiles +%files -f .mfiles %doc KEYS -%dir %{_javadir}/poi -%{_javadir}/poi/apache-poi*.jar %license LICENSE NOTICE -%files javadoc -%license LICENSE NOTICE -%{_javadocdir}/%{name} - -%files manual -%doc docs/* +%files javadoc -f .mfiles-javadoc %license LICENSE NOTICE %changelog +* Tue Sep 01 2015 gil cattaneo 3.12-2 +- build fix +- fix license field +- obsoletes manual sub-package + * Tue Jul 7 2015 Zbigniew Jędrzejewski-Szmek - 3.12-1 - Update to latest version diff --git a/sources b/sources index 781ae28..63413bc 100644 --- a/sources +++ b/sources @@ -1,8 +1,15 @@ -abe6bb6e7799e854934b3c634e8bcf7b Office%20Open%20XML%201st%20edition%20Part%204%20(PDF).zip +18f9162ce79907aaaa9287d12c0b2749 XAdESv141.xsd +2dabcd5f57c39efc0753c6fd25ed4cfa XAdES.xsd +541dd8dc113f715c166f6f1a5b54c2f1 xmldsig-core-schema.xsd +e59cc3898308a75b9e8929c4d4447dd1 dcmitype.xsd +66069b36a9a10673e94d0db03fca8eae dcterms.xsd +f3fa7880f6fac5c76e6ae5f236833d8e dc.xsd 922d7bcca3f3039ead44d5e45388af7e poi-3.12.pom 8914925b076cbd0152ac1601ae1d1284 poi-examples-3.12.pom 6fed2dd1150e923a419fda4156c07494 poi-excelant-3.12.pom 73961fb840e82b53e5de5555e295f75c poi-ooxml-3.12.pom 9ea8578553b162731b8256c141d99d66 poi-ooxml-schemas-3.12.pom 5b734a82a2d4d577b342313560f46ccd poi-scratchpad-3.12.pom +c8f0eac388691d5be0d1647146400a10 Office%20Open%20XML%201st%20edition%20Part%202%20(PDF).zip +abe6bb6e7799e854934b3c634e8bcf7b Office%20Open%20XML%201st%20edition%20Part%204%20(PDF).zip c76d87bf973818b7a3f3f584fec4cda2 poi-src-3.12-20150511.tar.gz