Blame SPECS/json_simple.spec

086cfe
# Filter requires for junit mvn()-style requires as json_simple doesn't
086cfe
# strictly need junit at runtime (it's a test-only dep)
086cfe
%global junit junit:junit
086cfe
%global mvn_requires_filter .*mvn\\(%{junit}\\)
086cfe
%global __requires_exclude ^%{mvn_requires_filter}$
086cfe
086cfe
Name:           json_simple
086cfe
Version:        1.1.1
086cfe
Release:        23%{?dist}
086cfe
Summary:        Simple Java toolkit for JSON
086cfe
License:        ASL 2.0
086cfe
URL:            http://code.google.com/p/json-simple/
086cfe
BuildArch:      noarch
086cfe
086cfe
# svn export http://json-simple.googlecode.com/svn/tags/tag_release_1_1_1/ json-simple-1.1.1
086cfe
# tar czf json-simple-1.1.1-src-svn.tar.gz json-simple-1.1.1
086cfe
Source0:        json-simple-1.1.1-src-svn.tar.gz
086cfe
086cfe
#https://code.google.com/p/json-simple/issues/detail?id=97
086cfe
Patch0:         json-simple-hash-java-1.8.patch
086cfe
086cfe
BuildRequires:  maven-local
086cfe
BuildRequires:  mvn(junit:junit)
086cfe
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
086cfe
086cfe
%description
086cfe
JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple 
086cfe
to encode or decode JSON text. 
086cfe
  * Full compliance with JSON specification (RFC4627) and reliable 
086cfe
  * Provides multiple functionalities such as encode, decode/parse 
086cfe
    and escape JSON text while keeping the library lightweight 
086cfe
  * Flexible, simple and easy to use by reusing Map and List interfaces 
086cfe
  * Supports streaming output of JSON text 
086cfe
  * Stoppable SAX-like interface for streaming input of JSON text 
086cfe
  * Heap based parser 
086cfe
  * High performance (see performance testing) 
086cfe
  * No dependency on external libraries 
086cfe
  * Both of the source code and the binary are JDK1.2 compatible 
086cfe
086cfe
%package javadoc
086cfe
Summary:       API documentation for %{name}
086cfe
086cfe
%description javadoc
086cfe
This package contains %{summary}.
086cfe
086cfe
%package tests
086cfe
Summary:       Tests jar for %{name}
086cfe
086cfe
%description tests
086cfe
This package contains %{summary}.
086cfe
086cfe
%prep
086cfe
%setup -q -n json-simple-%{version}
086cfe
find . -name '*.jar' -exec rm -f '{}' \;
086cfe
# All the files have dos line endings, remove them.
086cfe
find . -type f -exec %{__sed} -i 's/\r//' {} \;
086cfe
086cfe
%patch0 -p1
086cfe
086cfe
%mvn_file : %{name}
086cfe
086cfe
%pom_xpath_inject pom:project/pom:build/pom:plugins '<plugin>
086cfe
        <groupId>org.apache.maven.plugins</groupId>
086cfe
        <artifactId>maven-jar-plugin</artifactId>
086cfe
        <version>3.1.2</version>
086cfe
        <executions>
086cfe
          <execution>
086cfe
            <goals>
086cfe
              <goal>test-jar</goal>
086cfe
            </goals>
086cfe
          </execution>
086cfe
        </executions>
086cfe
      </plugin>'
086cfe
086cfe
%mvn_package com.googlecode.json-simple:json-simple:jar:tests:%{version} tests
086cfe
086cfe
%build
086cfe
%mvn_build
086cfe
086cfe
%install
086cfe
%mvn_install
086cfe
086cfe
%files -f .mfiles
086cfe
%doc AUTHORS.txt ChangeLog.txt LICENSE.txt README.txt
086cfe
086cfe
%files javadoc -f .mfiles-javadoc
086cfe
%doc LICENSE.txt
086cfe
086cfe
%files tests -f .mfiles-tests
086cfe
086cfe
%changelog
086cfe
* Mon Oct 07 2019 Severin Gehwolf <sgehwolf@redhat.com> - 1.1.1-23
086cfe
- rebuilt
086cfe
086cfe
* Mon Oct 07 2019 Severin Gehwolf <sgehwolf@redhat.com> - 1.1.1-22
086cfe
- Filter junit maven runtime requirement.
086cfe
086cfe
* Mon Oct 07 2019 Severin Gehwolf <sgehwolf@redhat.com> - 1.1.1-21
086cfe
- Add tests sub-package.
086cfe
086cfe
* Mon Oct 07 2019 Severin Gehwolf <sgehwolf@redhat.com> - 1.1.1-20
086cfe
- Initial import from Fedora.