%{?scl:%scl_package google-gson} %{!?scl:%global pkg_name %{name}} %{!?maven_scl:%global maven_scl_prefix %{nil}} %global short_name gson %global group_id com.google.code.gson Name: %{?scl_prefix}google-%{short_name} Version: 2.2.2 Release: 5%{?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/%{%{pkg_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-%{version} google-gson-%{version} # tar caf google-gson-%{version}.tar.xz google-gson-%{version} Source0: %{pkg_name}-%{version}.tar.xz BuildArch: noarch BuildRequires: java-1.7.0-openjdk-devel BuildRequires: jpackage-utils BuildRequires: %{maven_scl_prefix}maven-local BuildRequires: %{maven_scl_prefix}maven-surefire-provider-junit BuildRequires: %{maven_scl_prefix}maven-install-plugin BuildRequires: %{maven_scl_prefix}maven-enforcer-plugin Requires: java Requires: jpackage-utils %{?scl:Requires: %scl_runtime} %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. %prep %setup -q -n %{pkg_name}-%{version} # convert CR+LF to LF sed -i 's/\r//g' LICENSE %build scl enable %{scl} - <<"EOF" # LANG="C" or LANG="en_US.utf8" needed for the tests xmvn install -Dmaven.test.skip=true EOF %install # jars install -d -m 755 %{buildroot}%{_javadir} install -p -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{pkg_name}.jar # pom install -d -m 755 %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{pkg_name}.pom %add_maven_depmap JPP-%{pkg_name}.pom %{pkg_name}.jar %files %doc LICENSE README %{_javadir}/%{pkg_name}.jar %{_mavenpomdir}/JPP-%{pkg_name}.pom %{_mavendepmapfragdir}/%{pkg_name} %changelog * Fri May 23 2014 Sami Wagiaalla 2.2.2-5 - Add missing maven deps. * Thu May 22 2014 Sami Wagiaalla 2.2.2-5 - build for DTS 3 * Thu Apr 4 2013 Krzysztof Daniel 2.2.2-4 - Drop R dependency to java 7. - Drop javadoc subpackage. * Mon Feb 18 2013 Krzysztof Daniel 2.2.2-3 - Initial contribution to SCL. * Wed Dec 19 2012 Severin Gehwolf 2.2.2-2 - Add BR for surefire junit provider. * Wed Dec 19 2012 Severin Gehwolf 2.2.2-1 - Update to latest upstream release. * Thu Jul 19 2012 Fedora Release Engineering - 2.2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon Jul 2 2012 Alexander Kurtakov 2.2.1-2 - Add missing BR on maven-enforcer-plugin. - Remove no longer needed parts of the spec. * Mon Jul 2 2012 Krzysztof Daniel 2.2.1-1 - Update to latest upstream 2.2.1 * Fri Jan 13 2012 Fedora Release Engineering - 1.7.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Fri May 13 2011 Jaromir Capik - 1.7.1-3 - Removal of failing testInetAddressSerializationAndDeserialization * Wed May 11 2011 Jaromir Capik - 1.7.1-2 - Conversion of CR+LF to LF in the license file * Tue May 10 2011 Jaromir Capik - 1.7.1-1 - Initial version of the package