diff --git a/apache-commons-lang3.changes b/apache-commons-lang3.changes index dc0b654..6b86b54 100644 --- a/apache-commons-lang3.changes +++ b/apache-commons-lang3.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Oct 22 10:24:43 UTC 2018 - Fridrich Strba + +- Build commons-lang3-3.8.1 using modified build.xml and + default.properties from 3.4. +- Removed patch: + * commons-lang3-3.4-javadoc.patch + - integrated in the build.xml +- Use source and target version 1.7, since the code contains + diamond operator. + ------------------------------------------------------------------- Wed May 2 12:22:44 UTC 2018 - tchvatal@suse.com diff --git a/apache-commons-lang3.spec b/apache-commons-lang3.spec index 2667810..dabe3b4 100644 --- a/apache-commons-lang3.spec +++ b/apache-commons-lang3.spec @@ -12,25 +12,26 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define base_name lang3 %define short_name commons-%{base_name} -Name: apache-commons-lang3 -Version: 3.4 +Name: apache-%{short_name} +Version: 3.8.1 Release: 0 Summary: Apache Commons Lang Package License: Apache-2.0 Group: Development/Libraries/Java URL: http://commons.apache.org/%{base_name} Source0: http://archive.apache.org/dist/commons/lang/source/%{short_name}-%{version}-src.tar.gz -Patch0: commons-lang3-3.4-javadoc.patch +Source1: build.xml +Source2: default.properties BuildRequires: ant BuildRequires: ant-junit BuildRequires: fdupes -BuildRequires: java-devel >= 1.6 +BuildRequires: java-devel >= 1.7 BuildRequires: javapackages-local BuildRequires: javapackages-tools BuildRequires: junit @@ -59,39 +60,49 @@ Javadoc for %{name}. %prep %setup -q -n %{short_name}-%{version}-src -%patch0 -p1 +cp %{SOURCE1} . +cp %{SOURCE2} . sed -i 's/\r//' *.txt %build export OPT_JAR_LIST=`cat %{_sysconfdir}/ant.d/junit` export CLASSPATH= ant \ - -Dcompile.source=1.6 -Dcompile.target=1.6 \ + -Dcompile.source=1.7 -Dcompile.target=1.7 \ -Dfinal.name=%{short_name} \ jar javadoc %install + # jars -mkdir -p %{buildroot}%{_javadir} -cp -p target/%{short_name}.jar %{buildroot}%{_javadir}/%{name}.jar -(cd %{buildroot}%{_javadir} && for jar in apache-*; do ln -sf ${jar} `echo $jar| sed "s|apache-||g"`; done) +install -dm 755 %{buildroot}%{_javadir} +install -m 0644 target/%{short_name}.jar %{buildroot}%{_javadir}/%{short_name}-%{version}.jar +pushd %{buildroot}%{_javadir} + ln -s %{short_name}-%{version}.jar %{short_name}.jar + ln -s %{short_name}-%{version}.jar %{name}-%{version}.jar + ln -s %{name}-%{version}.jar %{name}.jar +popd # pom -mkdir -p %{buildroot}%{_mavenpomdir} -cp -p pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom -%add_maven_depmap +install -dm 755 %{buildroot}%{_mavenpomdir} +install -m 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}-%{version}.pom +%add_maven_depmap %{short_name}-%{version}.pom %{short_name}-%{version}.jar + # javadoc -mkdir -p %{buildroot}%{_javadocdir}/%{name} +install -dm 755 %{buildroot}%{_javadocdir}/%{name} cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ %fdupes -s %{buildroot}%{_javadocdir}/%{name}/ %files %license LICENSE.txt %doc NOTICE.txt RELEASE-NOTES.txt -%{_javadir}/%{name}.jar -%{_javadir}/%{short_name}.jar +%{_javadir}/*.jar %{_mavenpomdir}/* -%{_datadir}/maven-metadata/%{name}.xml +%if %{defined _maven_repository} +%{_mavendepmapfragdir}/%{name} +%else +%{_datadir}/maven-metadata/%{name}.xml* +%endif %files javadoc %{_javadocdir}/%{name} diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..236d1d5 --- /dev/null +++ b/build.xml @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/commons-lang3-3.4-javadoc.patch b/commons-lang3-3.4-javadoc.patch deleted file mode 100644 index 7a481f4..0000000 --- a/commons-lang3-3.4-javadoc.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- commons-lang3-3.4-src/build.xml 2015-04-03 14:28:37.000000000 +0200 -+++ commons-lang3-3.4-src/build.xml 2017-10-09 08:38:44.281345802 +0200 -@@ -123,9 +123,6 @@ - use="true" - encoding="${compile.encoding}" - source="${compile.source}"> -- -- -- - - - diff --git a/commons-lang3-3.4-src.tar.gz b/commons-lang3-3.4-src.tar.gz deleted file mode 100644 index 97197cd..0000000 --- a/commons-lang3-3.4-src.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f9a16e264aec59e4c7148763223480171f756f020d7a30aa617caabd382fa76 -size 771275 diff --git a/commons-lang3-3.8.1-src.tar.gz b/commons-lang3-3.8.1-src.tar.gz new file mode 100644 index 0000000..f7c3a83 --- /dev/null +++ b/commons-lang3-3.8.1-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9682e67375b6f03700e5bbaa2acceac60bc2f9049e11cafae3ce411ccaf633fb +size 965924 diff --git a/default.properties b/default.properties new file mode 100644 index 0000000..1814af2 --- /dev/null +++ b/default.properties @@ -0,0 +1,90 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# $Id: default.properties 1671054 2015-04-03 12:28:16Z britter $ + +# The location of the "junit.jar" JAR file +junit.jar = ${junit.home}/junit-4.12.jar + +# The location of the Easymock jar +easymock.jar = ${easymock.home}/easymock-3.3.1.jar + +# The location of the Commons-IO jar +commons-io.jar = ${commons-io.home}/commons-io-2.4.jar + +# The location of Hamcrest jar +hamcrest.jar = ${hamcrest.home}/hamcrest-all-1.3.jar + +# Whether or not to fork tests +junit.fork = true + +# The name of this component +component.name = commons-lang3 + +# The primary package name of this component +component.package = org.apache.commons.lang3 + +# The title of this component +component.title = Core Language Utilities + +# The current version number of this component +component.version = 3.8.1 + +# The name that is used to create the jar file +final.name = ${component.name}-${component.version} + +# The base directory for compilation targets +build.home = target + +# The base directory for component configuration files +conf.home = src/conf + +# The base directory for component sources +source.home = src/main/java + +# The base directory for unit test sources +test.home = src/test/java + +# Should Java compilations set the 'debug' compiler option? +compile.debug = true + +# Should Java compilations set the 'deprecation' compiler option? +compile.deprecation = true + +# Should Java compilations set the 'optimize' compiler option? +compile.optimize = true + +# Generate class files for specific VM version (e.g., 1.1 or 1.2). +# Note that the default value depends on the JVM that is running Ant. +# In particular, if you use JDK 1.4+ the generated classes will not be usable +# for a 1.1 Java VM unless you explicitly set this attribute to the value 1.1 +# (which is the default value for JDK 1.1 to 1.3). +compile.target = 1.7 + +# Specifies the source version for the Java compiler. +# Corresponds to the source attribute for the ant javac task. +# Valid values are 1.3, 1.4, 1.5. +compile.source = 1.7 + +# Specifies the source encoding. +compile.encoding = ISO-8859-1 + +# Should all tests fail if one does? +test.failonerror = true + +# The test runner to execute +test.runner = junit.textui.TestRunner