Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > be26c2aa9a1f89c6962a12ccd081212e > files > 3

json_simple-1.1-2.mga3.src.rpm


Name:          json_simple
Version:       1.1
Release:       %mkrel 2
Summary:       A simple Java toolkit for JSON
Group:         Development/Java
License:       ASL 2.0
Url:           http://code.google.com/p/json-simple/
Source0:       http://json-simple.googlecode.com/files/json_simple-%{version}-all.zip
Source1:       http://repo1.maven.org/maven2/com/googlecode/json-simple/json-simple/%{version}/json-simple-%{version}.pom

BuildRequires: java-devel
BuildRequires: jpackage-utils

BuildRequires: ant
BuildRequires: jflex
BuildRequires: junit
BuildRequires: ant-junit

Requires:      jpackage-utils
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
Requires:      java
BuildArch:     noarch

%description
JSON.simple is a simple Java toolkit for JSON.
You can use JSON.simple to encode or decode JSON text.

Features
    * Full compliance with JSON specification (RFC4627) and reliable 
    * Provides multiple functionalities such as encode, decode/parse and
      escape JSON text while keeping the library lightweight 
    * Flexible, simple and easy to use by reusing Map and List interfaces 
    * Supports streaming output of JSON text 
    * Stoppable SAX-like interface for streaming input of JSON text 
    * Heap based parser 
    * High performance.
    * No dependency on external libraries 
    * Both of the source code and the binary are JDK1.2 compatible 

%prep
%setup -q -n json_simple-%{version}-all

for j in $(find . -name "*.jar"); do
  mv $j ${j}.no
done


rm -rf src/org/json/simple/parser/Yylex.java
%{_bindir}/jflex doc/json.lex -d src/org/json/simple/parser/
find . -type f -exec sed -i 's/\r//' {} \;

%build
export CLASSPATH=$(build-classpath junit):lib/%{name}-%{version}.jar
ant jar
ant -f test.xml
%install
[ %{buildroot} != / ] && rm -rf %{buildroot}

install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
cp -p lib/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar

install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%{_javadir}/*.jar
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%doc AUTHORS.txt ChangeLog.txt README.txt LICENSE.txt test test.xml


%changelog

* Sat Jan 12 2013 umeabot <umeabot> 1.1-2.mga3
+ Revision: 355628
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Sep 05 2011 dmorgan <dmorgan> 1.1-1.mga2
+ Revision: 138706
- Fix buildrequires
- Adapt to mageia guidelines

  + gil <gil>
    - imported package json_simple