Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > 4ea99a3a0c84b38fff2f0d220e2cf4f8 > files > 2

json-3-2.fc12.src.rpm

# Copyright (c) 2000-2009, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

Name:       json
Summary:    JavaScript Object Notation support in Java
URL:        http://www.json.org/java/index.html
Version:    3
Release:    2%{?dist}
License:    ASL 2.0
Group:      Development/Libraries
BuildArch:  noarch
Source0:    http://www.json.org/java/apache.zip
BuildRequires:  jpackage-utils
BuildRequires:  java-devel

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
Java support for the JSON (JavaScript Object Notation) lightweight
data-interchange format.  It is based on a subset of the JavaScript
Programming Language, Standard ECMA-262 3rd Edition - December 1999.
JSON is a text format that is completely language independent but uses
conventions that are familiar to programmers of the C-family of
languages including C, C++, C#, Java, JavaScript, Perl, Python, and many
others.

%package javadoc
Summary:    Javadoc for %{name}
Group:      Documentation

%description javadoc
%{summary}.

%prep
%setup -q -c -n %{name}-%{version}
mkdir -p src/org
mv apache src/org

%build
export JAVA_HOME=%{_jvmdir}/java
mkdir -p target/classes
$JAVA_HOME/bin/javac -d target/classes $(find src -name "*.java")
$JAVA_HOME/bin/jar cf target/%{name}.jar -C target/classes org
mkdir -p target/site/apidocs
$JAVA_HOME/bin/javadoc -d target/site/apidocs $(find src -name "*.java")

%install
rm -rf $RPM_BUILD_ROOT
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 target/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{_javadir}/*

%files javadoc
%defattr(-,root,root)
%doc %{_javadocdir}/%{name}-%{version}

%changelog
* Thu Jul 30 2009 Andrew Overholt <overholt@redhat.com> 3-2
- Update summary/description.
- Resolves bug #511007.

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Apr 14 2009 Andrew Overholt <overholt@redhat.com> 2-1
- Some cleanups for Fedora (license, version, tabs vs. spaces).
- Remove maven POM file of unknown origin.
- Use APL-licensed source zip.

* Fri Jan 23 2009 Ralph Apel <r.apel at r-apel.de> 0:20080425-1.jpp5
- First release