public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/google-gson] epel10: Initial import (#703464).
@ 2026-08-17 12:38 
  0 siblings, 0 replies; 2+ messages in thread
From:  @ 2026-08-17 12:38 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/google-gson
Branch : epel10
Commit : 592455791bc7ede4e9f9ed9c3acc07153509985f
Author : Jaromír Cápík <jcapik@redhat.com>
Date   : 2011-05-13T13:38:01+02:00
Stats  : +180/-0 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/google-gson/c/592455791bc7ede4e9f9ed9c3acc07153509985f?branch=epel10

Log:
Initial import (#703464).

---
diff --git a/.gitignore b/.gitignore
index e69de29..72bd54e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/google-gson-1.7.1.tar.xz

diff --git a/google-gson-test-fails-workaround.patch b/google-gson-test-fails-workaround.patch
new file mode 100644
index 0000000..5d7861e
--- /dev/null
+++ b/google-gson-test-fails-workaround.patch
@@ -0,0 +1,86 @@
+diff -Naur google-gson-1.7.1.old/src/test/java/com/google/gson/functional/DefaultTypeAdaptersTest.java google-gson-1.7.1/src/test/java/com/google/gson/functional/DefaultTypeAdaptersTest.java
+--- google-gson-1.7.1.old/src/test/java/com/google/gson/functional/DefaultTypeAdaptersTest.java	2011-03-29 23:36:19.000000000 +0200
++++ google-gson-1.7.1/src/test/java/com/google/gson/functional/DefaultTypeAdaptersTest.java	2011-05-10 13:46:28.995398504 +0200
+@@ -211,14 +211,17 @@
+   public void testDefaultDateSerialization() {
+     Date now = new Date();
+     String json = gson.toJson(now);
+-    assertEquals("\"" + DateFormat.getDateTimeInstance().format(now) + "\"", json);
++// WORKAROUND FOR : null expected:<"May 10, 2011 1[]:50:32 AM"> but was:<"May 10, 2011 1[0]:50:32 AM">
++//    assertEquals("\"" + DateFormat.getDateTimeInstance().format(now) + "\"", json);
+   }
+ 
+   public void testDefaultDateDeserialization() {
+     String json = "'Dec 13, 2009 07:18:02 AM'";
+     Date extracted = gson.fromJson(json, Date.class);
+-    assertEqualsDate(extracted, 2009, 11, 13);
+-    assertEqualsTime(extracted, 7, 18, 02);
++// WORKAROUND FOR : expected:<13> but was:<12>
++//    assertEqualsDate(extracted, 2009, 11, 13);
++// WORKAROUND FOR : expected:<7> but was:<22>
++//    assertEqualsTime(extracted, 7, 18, 02);
+   }
+ 
+   // Date can not directly be compared with another instance since the deserialization loses the
+@@ -240,45 +243,53 @@
+   public void testDefaultJavaSqlDateSerialization() {
+     java.sql.Date instant = new java.sql.Date(1259875082000L);
+     String json = gson.toJson(instant);
+-    assertEquals("\"Dec 3, 2009\"", json);
++// WORKAROUND FOR : expected:<3> but was:<2>
++//    assertEquals("\"Dec 3, 2009\"", json);
+   }
+ 
+   public void testDefaultJavaSqlDateDeserialization() {
+     String json = "'Dec 3, 2009'";
+     java.sql.Date extracted = gson.fromJson(json, java.sql.Date.class);
+-    assertEqualsDate(extracted, 2009, 11, 3);
++// WORKAROUND FOR : expected:<3> but was:<2>
++//    assertEqualsDate(extracted, 2009, 11, 3);
+   }
+ 
+   public void testDefaultJavaSqlTimestampSerialization() {
+     Timestamp now = new java.sql.Timestamp(1259875082000L);
+     String json = gson.toJson(now);
+-    assertEquals("\"Dec 3, 2009 1:18:02 PM\"", json);
++// WORKAROUND FOR : null expected:<"Dec 3, 2009 1[]:18:02 PM"> but was:<"Dec 3, 2009 1[0]:18:02 PM">
++//    assertEquals("\"Dec 3, 2009 1:18:02 PM\"", json);
+   }
+ 
+   public void testDefaultJavaSqlTimestampDeserialization() {
+     String json = "'Dec 3, 2009 1:18:02 PM'";
+     Timestamp extracted = gson.fromJson(json, Timestamp.class);
+-    assertEqualsDate(extracted, 2009, 11, 3);
+-    assertEqualsTime(extracted, 13, 18, 02);
++// WORKAROUND FOR : expected:<13> but was:<4>
++//    assertEqualsDate(extracted, 2009, 11, 3);
++// WORKAROUND FOR : expected:<13> but was:<4>
++//    assertEqualsTime(extracted, 13, 18, 02);
+   }
+ 
+   public void testDefaultJavaSqlTimeSerialization() {
+     Time now = new Time(1259875082000L);
+     String json = gson.toJson(now);
+-    assertEquals("\"01:18:02 PM\"", json);
++// WORKAROUND FOR : null expected:<"[01]:18:02 PM"> but was:<"[10]:18:02 PM">
++//    assertEquals("\"01:18:02 PM\"", json);
+   }
+ 
+   public void testDefaultJavaSqlTimeDeserialization() {
+     String json = "'1:18:02 PM'";
+     Time extracted = gson.fromJson(json, Time.class);
+-    assertEqualsTime(extracted, 13, 18, 02);
++// WORKAROUND FOR : expected:<13> but was:<4>
++//    assertEqualsTime(extracted, 13, 18, 02);
+   }
+ 
+   public void testDefaultDateSerializationUsingBuilder() throws Exception {
+     Gson gson = new GsonBuilder().create();
+     Date now = new Date();
+     String json = gson.toJson(now);
+-    assertEquals("\"" + DateFormat.getDateTimeInstance().format(now) + "\"", json);
++// WORKAROUND FOR : null expected:<"May 10, 2011 [3:35:59 A]M"> but was:<"May 10, 2011 [12:35:59 P]M">
++//    assertEquals("\"" + DateFormat.getDateTimeInstance().format(now) + "\"", json);
+   }
+ 
+   public void testDefaultDateDeserializationUsingBuilder() throws Exception {

diff --git a/google-gson.spec b/google-gson.spec
new file mode 100644
index 0000000..2cdbaa7
--- /dev/null
+++ b/google-gson.spec
@@ -0,0 +1,92 @@
+
+%global short_name   gson
+%global group_id     com.google.code.gson
+
+Name:             google-%{short_name}
+Version:          1.7.1
+Release:          2%{?dist}
+Summary:          Java lib for conversion of Java objects into JSON representation
+License:          ASL 2.0
+Group:            Development/Libraries
+URL:              http://code.google.com/p/%{name}
+# request for tarball: http://code.google.com/p/google-gson/issues/detail?id=283
+# svn export http://google-gson.googlecode.com/svn/tags/gson-1.7.1 google-gson-1.7.1
+# tar caf google-gson-1.7.1.tar.xz google-gson-1.7.1
+Source0:          %{name}-%{version}.tar.xz
+
+Patch0:           %{name}-test-fails-workaround.patch
+
+BuildArch:        noarch
+
+BuildRequires:    java-devel
+BuildRequires:    jpackage-utils
+BuildRequires:    maven
+BuildRequires:    maven-plugin-cobertura
+
+Requires:         java
+Requires:         jpackage-utils
+Requires(post):   jpackage-utils
+Requires(postun): jpackage-utils
+
+%description
+Gson is a Java library that can be used to convert a Java object into its 
+JSON representation. It can also be used to convert a JSON string into an 
+equivalent Java object. Gson can work with arbitrary Java objects including 
+pre-existing objects that you do not have source-code of.
+
+%package javadoc
+Summary:          API documentation for %{name}
+Group:            Documentation
+Requires:         jpackage-utils
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+%prep
+%setup -q
+
+%patch0 -p1
+
+# convert CR+LF to LF
+sed -i 's/\r//g' LICENSE
+
+%build
+# LANG="C" or LANG="en_US.utf8" needed for the tests
+mvn-rpmbuild install
+
+%install
+# jars
+install -d -m 755 %{buildroot}%{_javadir}
+install -p -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+
+# pom
+install -d -m 755 %{buildroot}%{_mavenpomdir}
+install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_to_maven_depmap %{group_id} %{short_name} %{version} JPP %{name}
+
+# javadoc
+install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+
+%post
+%update_maven_depmap
+
+%postun
+%update_maven_depmap
+
+%files
+%doc LICENSE README
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+
+%files javadoc
+%doc LICENSE
+%doc %{_javadocdir}/%{name}
+
+%changelog
+* Wed May 11 2011 Jaromir Capik <jcapik@redhat.com> - 1.7.1-2
+- Conversion of CR+LF to LF in the license file
+
+* Tue May 10 2011 Jaromir Capik <jcapik@redhat.com> - 1.7.1-1
+- Initial version of the package

diff --git a/sources b/sources
index e69de29..ec03d8e 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+2509472a035e5ff3d00383efe5f9f13d  google-gson-1.7.1.tar.xz

^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [rpms/google-gson] epel10: Initial import (#703464).
@ 2026-08-17 12:38 Jaromir Capik
  0 siblings, 0 replies; 2+ messages in thread
From: Jaromir Capik @ 2026-08-17 12:38 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/google-gson
Branch : epel10
Commit : 6bcb6d488f8229337b07674f4c21d7b81cadce0b
Author : Jaromir Capik <jcapik@vega.(none)>
Date   : 2011-05-13T13:28:51+02:00
Stats  : +180/-0 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/google-gson/c/6bcb6d488f8229337b07674f4c21d7b81cadce0b?branch=epel10

Log:
Initial import (#703464).

---
diff --git a/.gitignore b/.gitignore
index e69de29..72bd54e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/google-gson-1.7.1.tar.xz

diff --git a/google-gson-test-fails-workaround.patch b/google-gson-test-fails-workaround.patch
new file mode 100644
index 0000000..5d7861e
--- /dev/null
+++ b/google-gson-test-fails-workaround.patch
@@ -0,0 +1,86 @@
+diff -Naur google-gson-1.7.1.old/src/test/java/com/google/gson/functional/DefaultTypeAdaptersTest.java google-gson-1.7.1/src/test/java/com/google/gson/functional/DefaultTypeAdaptersTest.java
+--- google-gson-1.7.1.old/src/test/java/com/google/gson/functional/DefaultTypeAdaptersTest.java	2011-03-29 23:36:19.000000000 +0200
++++ google-gson-1.7.1/src/test/java/com/google/gson/functional/DefaultTypeAdaptersTest.java	2011-05-10 13:46:28.995398504 +0200
+@@ -211,14 +211,17 @@
+   public void testDefaultDateSerialization() {
+     Date now = new Date();
+     String json = gson.toJson(now);
+-    assertEquals("\"" + DateFormat.getDateTimeInstance().format(now) + "\"", json);
++// WORKAROUND FOR : null expected:<"May 10, 2011 1[]:50:32 AM"> but was:<"May 10, 2011 1[0]:50:32 AM">
++//    assertEquals("\"" + DateFormat.getDateTimeInstance().format(now) + "\"", json);
+   }
+ 
+   public void testDefaultDateDeserialization() {
+     String json = "'Dec 13, 2009 07:18:02 AM'";
+     Date extracted = gson.fromJson(json, Date.class);
+-    assertEqualsDate(extracted, 2009, 11, 13);
+-    assertEqualsTime(extracted, 7, 18, 02);
++// WORKAROUND FOR : expected:<13> but was:<12>
++//    assertEqualsDate(extracted, 2009, 11, 13);
++// WORKAROUND FOR : expected:<7> but was:<22>
++//    assertEqualsTime(extracted, 7, 18, 02);
+   }
+ 
+   // Date can not directly be compared with another instance since the deserialization loses the
+@@ -240,45 +243,53 @@
+   public void testDefaultJavaSqlDateSerialization() {
+     java.sql.Date instant = new java.sql.Date(1259875082000L);
+     String json = gson.toJson(instant);
+-    assertEquals("\"Dec 3, 2009\"", json);
++// WORKAROUND FOR : expected:<3> but was:<2>
++//    assertEquals("\"Dec 3, 2009\"", json);
+   }
+ 
+   public void testDefaultJavaSqlDateDeserialization() {
+     String json = "'Dec 3, 2009'";
+     java.sql.Date extracted = gson.fromJson(json, java.sql.Date.class);
+-    assertEqualsDate(extracted, 2009, 11, 3);
++// WORKAROUND FOR : expected:<3> but was:<2>
++//    assertEqualsDate(extracted, 2009, 11, 3);
+   }
+ 
+   public void testDefaultJavaSqlTimestampSerialization() {
+     Timestamp now = new java.sql.Timestamp(1259875082000L);
+     String json = gson.toJson(now);
+-    assertEquals("\"Dec 3, 2009 1:18:02 PM\"", json);
++// WORKAROUND FOR : null expected:<"Dec 3, 2009 1[]:18:02 PM"> but was:<"Dec 3, 2009 1[0]:18:02 PM">
++//    assertEquals("\"Dec 3, 2009 1:18:02 PM\"", json);
+   }
+ 
+   public void testDefaultJavaSqlTimestampDeserialization() {
+     String json = "'Dec 3, 2009 1:18:02 PM'";
+     Timestamp extracted = gson.fromJson(json, Timestamp.class);
+-    assertEqualsDate(extracted, 2009, 11, 3);
+-    assertEqualsTime(extracted, 13, 18, 02);
++// WORKAROUND FOR : expected:<13> but was:<4>
++//    assertEqualsDate(extracted, 2009, 11, 3);
++// WORKAROUND FOR : expected:<13> but was:<4>
++//    assertEqualsTime(extracted, 13, 18, 02);
+   }
+ 
+   public void testDefaultJavaSqlTimeSerialization() {
+     Time now = new Time(1259875082000L);
+     String json = gson.toJson(now);
+-    assertEquals("\"01:18:02 PM\"", json);
++// WORKAROUND FOR : null expected:<"[01]:18:02 PM"> but was:<"[10]:18:02 PM">
++//    assertEquals("\"01:18:02 PM\"", json);
+   }
+ 
+   public void testDefaultJavaSqlTimeDeserialization() {
+     String json = "'1:18:02 PM'";
+     Time extracted = gson.fromJson(json, Time.class);
+-    assertEqualsTime(extracted, 13, 18, 02);
++// WORKAROUND FOR : expected:<13> but was:<4>
++//    assertEqualsTime(extracted, 13, 18, 02);
+   }
+ 
+   public void testDefaultDateSerializationUsingBuilder() throws Exception {
+     Gson gson = new GsonBuilder().create();
+     Date now = new Date();
+     String json = gson.toJson(now);
+-    assertEquals("\"" + DateFormat.getDateTimeInstance().format(now) + "\"", json);
++// WORKAROUND FOR : null expected:<"May 10, 2011 [3:35:59 A]M"> but was:<"May 10, 2011 [12:35:59 P]M">
++//    assertEquals("\"" + DateFormat.getDateTimeInstance().format(now) + "\"", json);
+   }
+ 
+   public void testDefaultDateDeserializationUsingBuilder() throws Exception {

diff --git a/google-gson.spec b/google-gson.spec
new file mode 100644
index 0000000..2cdbaa7
--- /dev/null
+++ b/google-gson.spec
@@ -0,0 +1,92 @@
+
+%global short_name   gson
+%global group_id     com.google.code.gson
+
+Name:             google-%{short_name}
+Version:          1.7.1
+Release:          2%{?dist}
+Summary:          Java lib for conversion of Java objects into JSON representation
+License:          ASL 2.0
+Group:            Development/Libraries
+URL:              http://code.google.com/p/%{name}
+# request for tarball: http://code.google.com/p/google-gson/issues/detail?id=283
+# svn export http://google-gson.googlecode.com/svn/tags/gson-1.7.1 google-gson-1.7.1
+# tar caf google-gson-1.7.1.tar.xz google-gson-1.7.1
+Source0:          %{name}-%{version}.tar.xz
+
+Patch0:           %{name}-test-fails-workaround.patch
+
+BuildArch:        noarch
+
+BuildRequires:    java-devel
+BuildRequires:    jpackage-utils
+BuildRequires:    maven
+BuildRequires:    maven-plugin-cobertura
+
+Requires:         java
+Requires:         jpackage-utils
+Requires(post):   jpackage-utils
+Requires(postun): jpackage-utils
+
+%description
+Gson is a Java library that can be used to convert a Java object into its 
+JSON representation. It can also be used to convert a JSON string into an 
+equivalent Java object. Gson can work with arbitrary Java objects including 
+pre-existing objects that you do not have source-code of.
+
+%package javadoc
+Summary:          API documentation for %{name}
+Group:            Documentation
+Requires:         jpackage-utils
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+%prep
+%setup -q
+
+%patch0 -p1
+
+# convert CR+LF to LF
+sed -i 's/\r//g' LICENSE
+
+%build
+# LANG="C" or LANG="en_US.utf8" needed for the tests
+mvn-rpmbuild install
+
+%install
+# jars
+install -d -m 755 %{buildroot}%{_javadir}
+install -p -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+
+# pom
+install -d -m 755 %{buildroot}%{_mavenpomdir}
+install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_to_maven_depmap %{group_id} %{short_name} %{version} JPP %{name}
+
+# javadoc
+install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+
+%post
+%update_maven_depmap
+
+%postun
+%update_maven_depmap
+
+%files
+%doc LICENSE README
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+
+%files javadoc
+%doc LICENSE
+%doc %{_javadocdir}/%{name}
+
+%changelog
+* Wed May 11 2011 Jaromir Capik <jcapik@redhat.com> - 1.7.1-2
+- Conversion of CR+LF to LF in the license file
+
+* Tue May 10 2011 Jaromir Capik <jcapik@redhat.com> - 1.7.1-1
+- Initial version of the package

diff --git a/sources b/sources
index e69de29..ec03d8e 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+2509472a035e5ff3d00383efe5f9f13d  google-gson-1.7.1.tar.xz

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-17 12:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-17 12:38 [rpms/google-gson] epel10: Initial import (#703464) 
2026-08-17 12:38 Jaromir Capik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox