# # spec file for package joda-time # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %global tzversion tzdata2018i Name: joda-time Version: 2.10.1 Release: 16.26 Summary: Java date and time API License: Apache-2.0 Group: Development/Libraries/Java URL: http://www.joda.org/joda-time/ Source0: https://github.com/JodaOrg/%{name}/archive/v%{version}.tar.gz Source1: ftp://ftp.iana.org/tz/releases/%{tzversion}.tar.gz Source100: %{name}-build.xml Patch0: joda-time-fix-tests.patch BuildRequires: ant BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: java-11-devel BuildRequires: javapackages-local BuildRequires: joda-convert %if 0%{?rhel} >= 9 BuildRequires: xmvn-tools %else BuildRequires: xmvn-install %endif BuildArch: noarch %description Joda-Time provides a quality replacement for the Java date and time classes. The design allows for multiple calendar systems, while still providing a simple API. The 'default' calendar is the ISO8601 standard which is used by XML. The Gregorian, Julian, Buddhist, Coptic and Ethiopic systems are also included, and we welcome further additions. Supporting classes include time zone, duration, format and parsing. %package javadoc Summary: Javadocs for %{name} Group: Documentation/HTML %description javadoc This package contains the API documentation for %{name}. %prep %setup -q %patch0 -p1 dos2unix LICENSE.txt NOTICE.txt RELEASE-NOTES.txt cp %{SOURCE100} build.xml # all java binaries must be removed from the sources find . -name '*.jar' -exec rm -f '{}' \; # replace internal tzdata rm -f src/main/java/org/joda/time/tz/src/* tar -xzf %{SOURCE1} -C src/main/java/org/joda/time/tz/src/ %pom_remove_plugin :maven-enforcer-plugin %pom_xpath_set pom:project/pom:properties/pom:maven.compiler.source "1.7" %pom_xpath_set pom:project/pom:properties/pom:maven.compiler.target "1.7" %pom_xpath_set pom:project/pom:properties/pom:maven.compiler.compilerVersion "1.7" %mvn_file :%{name} %{name} %build %mvn_artifact pom.xml target/%{name}-%{version}.jar #export JAVA_HOME=/usr/lib/jvm/java-11/bin/java #java -version #%%{ant} \ JAVA_HOME=/usr/lib/jvm/java-11-openjdk/bin/java ant \ -Djoda-convert.jar=%{_javadir}/joda-convert.jar \ clean jar javadoc %install %mvn_install ## jars #install -d -m 755 %{buildroot}%{_javadir} ## Don't install a versioned jar and symlink to it, instead install ## the unversioned jar as per Java Packaging Guidelines #install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar ## poms #install -d -m 755 %{buildroot}%{_mavenpomdir} #install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom #%%add_maven_depmap %{name}.pom %{name}.jar ## javadoc #install -dm 0755 %{buildroot}%{_javadocdir}/%{name} #cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ #%fdupes -s %{buildroot}%{_javadocdir} %files -f .mfiles %license LICENSE.txt NOTICE.txt %doc RELEASE-NOTES.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt NOTICE.txt #%{_javadocdir}/%{name} %changelog * Wed Apr 27 2022 Stefan Bluhm - Removed deprecated %%add_maven_depmap * Wed Feb 6 2019 Fridrich Strba - Upgrade to version 2.10.1 * Fix time-zone compiler for Namibia. Fixes #485. * Fix time-zone compiler for Tokyo. * Handle negative SAVE values in tzdb. * Add Instant.EPOCH. See #472. * Clarify negative durations. See #465. * Add Instant.ofEpochMilli(). Add Instant.ofEpochSecond(). Fixes #458. * Add automatic module name for Java SE 9. * Add Kazakh language translations. Fixes #446 * Avoid double addition when using lenient chronology. Fixes #432. * Clarify Period.fieldDifference() Javadoc. * Clarify Instant.withMillis() Javadoc. Fixes jodaorg.github.io#5 * Add ZoneInfoProvider() constructor. * Optimise release process. * DateTimeZone data updated to version 2017b. * Handle plus/minus of Integer.MIN_VALUE/MAX_VALUE months correctly. Fixes #418. * Clarify time fields are based on the local time-line. Fixes #415. * Fix spelling mistakes. Fixes #412. * Fix DateTimePrinterInternalPinter that outputs data twice. Fixes #409. * Support conversion of old TimeZone where name has digits other than ASCII [#381] * Add Norwegian period translations [#378] * Add Duration.dividedBy(long,RoundingMode) [#69, #379] * Fixed bug where clock read twice when comparing two nulls in DateTimeComparator [#404] * Fixed minor issues with historic time-zone data [#373] * Fix bug in time-zone binary search [#332, #386] The fix in v2.9.2 caused problems when the time-zone being parsed was not the last element in the input string. New approach uses a different approach to the problem. * Update tests for JDK 9 [#394] * Close buffered reader correctly in zone info compiler [#396] * Handle locale correctly zone info compiler [#397] * Loading time-zone provider now occurs in a privileged block [#327, #375] * Make DateTimeUtils.SYSTEM_MILLIS_PROVIDER public [#357] * Fix bug when adding months at the maximum limits of integer [#361] * Add Turkish period translations [#364] * Fix bug in time-zone binary search [#332] * Minor fixes to code internals [#339, #326, #344, #350, #343] * Better document behaviour [#325] * Fix bug introduced by Long.MIN_VALUE and Long.MAX_VALUE changes [#328] * Faster parsing of time-zone identifiers [#282] * Added Interval.parseWithOffset(String) [#299, #296] Provides a way to parse the fixed offset in an interval string * Add DateTimeFormatter methods for StringBuilder [#298] * Add Russian period translations [#320] * Add Italian period translations [#312] * Add Czech period translations [#313] * Clarify that PeriodFormatterBuilder is in an invalid state once built [#309] * Allow DateTime and Interval to refer to values at Long.MIN_VALUE and Long.MAX_VALUE [#297, #190] A DateTime may be created with any millisecond value, however at the very edges there may be some undesirable effects, for example always using UTC instead of the time-zone * Better error message for malformed tzdb files [#319] * Better error message for interval constructor [#321] * Fixed to handle JDK 8u60 [#288, #291] Without this fix, formatting a time-zone will print "+00:00" instead of "GMT" for the GMT time-zone * Fix parsing of basic form ISO style where year has unnecessary plus sign [#86] For example, +20151030 will now be correctly parsed as year 2015. * Fix overflow bug in intervals [#315] - Removed patches: * joda-time-1.6-sourcetarget.patch + correct source and target levels specified in the ant build.xml file * joda-time-use-system-junit.patch + not needed any more, since we are not running tests for the while - Added patch: + joda-time-fix-tests.patch + fix java version parsing for versions > 9 - DateTimeZone data updated to version 2018i - Add build.xml file to allow build with ant * Mon Nov 19 2018 Fridrich Strba - Add maven pom file and register joda-time as a maven artifact * Tue Sep 19 2017 fstrba@suse.com - Added patch: * joda-time-1.6-sourcetarget.patch + make compile.source and compile.target properties that can be specified on command-line - Build with java source and target level 1.6 in order to allow building with jdk9 * Tue Jul 8 2014 tchvatal@suse.com - Do not depend on ant-nodeps. * Mon Sep 9 2013 tchvatal@suse.com - Move from jpackage-utils to javapackage-tools * Wed Apr 28 2010 ro@suse.de - update timezone data to current 2010h * Wed Apr 28 2010 ro@suse.de - remove needless buildroot cleaning st start of install section * Thu Jul 23 2009 rel-eng@lists.fedoraproject.org - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Tue Feb 24 2009 rel-eng@lists.fedoraproject.org - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Thu Dec 11 2008 konrad@tylerc.org - New upstream version (1.6). * Thu Oct 30 2008 konrad@tylerc.org - New tzdata. * Sun Oct 12 2008 konrad@tylerc.org - New tzdata (2008g). * Fri Aug 22 2008 konrad@tylerc.org - New version with new tzdata (2008e). * Fri Jul 18 2008 konrad@tylerc.org - New version with new tzdata (2008d). * Sun Jun 8 2008 konrad@tylerc.org - New version with new tzdata (2008c). * Sat Apr 5 2008 konrad@tylerc.org - Don't compile GCJ bits yet as we hit some GCJ bug. * Fri Apr 4 2008 konrad@tylerc.org - Update to tzdata2008b. - Use unversioned jar. - Some small things to comply with Java Packaging Guidelines. - GCJ support. * Sun Mar 16 2008 konrad@tylerc.org - Many small changes from bz# 436239 comment 6. - Change -javadocs to -javadoc in accordance with java packaging guidelines draft. * Sat Mar 15 2008 konrad@tylerc.org - Use system junit via Mamoru Tasaka's patch. * Sun Mar 2 2008 konrad@tylerc.org - Initial package.