Name: json-lib Version: 2.4 Release: 16%{?dist} Summary: JSON library for Java License: ASL 2.0 URL: http://json-lib.sourceforge.net/ # NOTE: newer release (> 2.4) is available here https://github.com/aalmiray/Json-lib/ # A plain jarball with the source is provided by upstream. We could use # it, but we choose to build with maven for the sake of consistency. # Therefore we pull the tree with maven metadata from git. # sh create-tarball.sh Source0: %{name}-%{version}.tar.xz Source1: create-tarball.sh Patch0: %{name}-%{version}-antrun-plugin.patch # Jenkins sources/patches # tarball comming from not yet released upstream git repo # it contains changes from Jenkins upstream Source100: jenkins-%{name}-%{version}.tar.xz Source101: http://repo.jenkins-ci.org/releases/org/kohsuke/stapler/json-lib/%{version}-jenkins-3/json-lib-%{version}-jenkins-3.pom Patch100: %{name}-%{version}-Use-Jenkins-default-values.patch BuildRequires: java-devel BuildRequires: maven-local BuildRequires: maven-shared BuildRequires: maven-surefire-provider-junit BuildRequires: mvn(commons-beanutils:commons-beanutils) BuildRequires: mvn(commons-collections:commons-collections) BuildRequires: mvn(commons-lang:commons-lang) BuildRequires: mvn(commons-logging:commons-logging) BuildRequires: mvn(junit:junit) BuildRequires: mvn(log4j:log4j) BuildRequires: mvn(net.sf.ezmorph:ezmorph) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-site-plugin) BuildRequires: mvn(org.codehaus.groovy:groovy18:1.8) BuildRequires: mvn(org.codehaus.groovy:groovy18-all:1.8) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(oro:oro) BuildRequires: mvn(xom:xom) BuildRequires: mvn(xmlunit:xmlunit) # antrun-plugin deps for groovy ant task BuildRequires: mvn(antlr:antlr) BuildRequires: mvn(asm:asm-all) BuildRequires: mvn(commons-cli:commons-cli) BuildRequires: mvn(org.slf4j:slf4j-nop) BuildArch: noarch %description JSON-lib is a java library for transforming beans, maps, collections, java arrays and XML to JSON and back again to beans and DynaBeans. %package -n jenkins-json-lib Summary: Jenkins JSON library %description -n jenkins-json-lib JSON-lib is a java library for transforming beans, maps, collections, java arrays and XML to JSON and back again to beans and DynaBeans. This package contains JSON library used in Jenkins. %package javadoc Summary: Javadoc for %{name} %description javadoc API documentation for %{name}. %prep %setup -q tar xf %{SOURCE100} # compile: src/main/groovy/net/sf/json/groovy/GJson.groovy # src/main/jdk15/net/sf/json/util/EnumMorpher.java %patch0 -p1 # Not strictly needed, but it makes no harm to be on the safe side find -name '*.jar' -delete find -name '*.class' -delete %pom_xpath_set "pom:project/pom:dependencies/pom:dependency[pom:groupId = 'org.codehaus.groovy']/pom:artifactId" groovy %pom_remove_plugin :maven-compiler-plugin %pom_remove_plugin :gmaven-plugin %pom_xpath_remove "pom:project/pom:prerequisites" %pom_xpath_remove "pom:project/pom:reporting" # error: duplicate class rm -r src/main/jdk15/net/sf/json/JSON*.java %pom_add_plugin org.apache.maven.plugins:maven-javadoc-plugin . ' UTF-8 UTF-8 ${basedir}/src/main ' # should be removed from distribution %pom_remove_dep :commons-httpclient %pom_change_dep org.codehaus.groovy:groovy org.codehaus.groovy:groovy18:1.8 cp %{SOURCE101} jenkins-%{name}-%{version}/pom.xml pushd jenkins-%{name}-%{version} %patch100 -p1 %pom_change_dep org.codehaus.groovy:groovy-all org.codehaus.groovy:groovy18-all:1.8 %mvn_file org.kohsuke.stapler:json-lib jenkins-%{name} %mvn_package org.kohsuke.stapler:json-lib jenkins-json-lib popd %build %mvn_file : %{name} %mvn_build -- -Dproject.build.sourceEncoding=UTF-8 # build Jenkins JSON lib pushd jenkins-%{name}-%{version} %mvn_build -f popd %install %mvn_install # install Jenkins JSON lib pushd jenkins-%{name}-%{version} %mvn_install popd %files -f .mfiles %license LICENSE.txt %files -n jenkins-json-lib -f jenkins-%{name}-%{version}/.mfiles-jenkins-json-lib %license LICENSE.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt %changelog * Fri Feb 01 2019 Fedora Release Engineering - 2.4-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 2.4-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Feb 07 2018 Fedora Release Engineering - 2.4-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 2.4-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 2.4-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Jun 21 2016 gil cattaneo 2.4-11 - add missing build requires * Thu Feb 04 2016 Fedora Release Engineering - 2.4-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jun 17 2015 Fedora Release Engineering - 2.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Fri Feb 06 2015 gil cattaneo 2.4-8 - introduce license macro * Mon Jun 23 2014 Michal Srb - 2.4-7 - Migrate to groovy18 * Sun Jun 08 2014 Fedora Release Engineering - 2.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Mon Apr 07 2014 Michal Srb - 2.4-5 - Build jenkins-json-lib from upstream devel branch * Tue Mar 04 2014 Stanislav Ochotnicky - 2.4-4 - Use Requires: java-headless rebuild (#1067528) * Wed Feb 12 2014 Michal Srb - 2.4-3 - Build jenkins-json-lib artifact * Wed Feb 12 2014 Michal Srb - 2.4-2 - Install license file * Wed Feb 12 2014 Michal Srb - 2.4-1 - Update to upstream version 2.4 * Sat Aug 17 2013 gil cattaneo 2.3-12 - fix rhbz#992642 - remove, not required, antlr3-tool, asm2, dom4j, jaxen - use pom macros - use groovy ant task (PATCH0) - minor changes to adapt to current guideline * Sat Aug 03 2013 Fedora Release Engineering - 2.3-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Feb 22 2013 Andy Grimm - 2.3-10 - Add maven-local and maven-shared to BuildRequires (RHBZ#914106) * Thu Feb 14 2013 Fedora Release Engineering - 2.3-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Fri Aug 10 2012 Andy Grimm - 2.3-8 - Update to maven2, fixing FTBFS * Thu Jul 19 2012 Fedora Release Engineering - 2.3-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Jan 13 2012 Fedora Release Engineering - 2.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Feb 09 2011 Fedora Release Engineering - 2.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Tue Jul 27 2010 Lubomir Rintel - 2.3-4 - Add some extra BRs to build this for f14 * Fri Jul 23 2010 Lubomir Rintel - 2.3-3 - Incorporate Review suggestions (Stanislav Ochotnicky) - Drop prebuilt jars - Tighten up the BRs * Thu Jun 17 2010 Lubomir Rintel - 2.3-2 - Carry the build over to Maven - Package Maven poms & add depmap - Add javadoc subpackage * Thu May 20 2010 Lubomir Rintel - 2.3-1 - Initial packaging