File jformatstring.spec of Package jformatstring

# spec file for package jformatstring (Version 0)
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2009, JPackage Project
# All rights reserved.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define with()          %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without()       %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
%define bcond_with()    %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}

%bcond_with gcj_support

%if %with gcj_support
%define gcj_support 1
%define gcj_support 0

Name:           jformatstring
Version:        0
Release:        1
Summary:        Java library for format string checks
Group:          Development/Libraries/Java
License:        GPLv2
# svn -q export -r 8 jformatstring-0 --username guest --password guest && tar cjf jformatstring-0.tar.bz2 jformatstring-0
Source0:        jformatstring-0.tar.bz2
Provides:       jFormatString = %{version}-%{release}
Obsoletes:      jFormatString < %{version}-%{release}
BuildRequires:  ant
BuildRequires:  java-devel
BuildRequires:  java-javadoc
BuildRequires:  jpackage-utils
BuildRequires:  junit4
%if %{gcj_support}
BuildRequires:  java-gcj-compat-devel
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This project is derived from Sun's implementation of java.util.Formatter. It 
is designed to allow compile time checks as to whether or not a use of format 
string will be erronous when executed at runtime.

This code is derived from the OpenJDK implementation, jdk1.7.0-b35. As such, 
it is licensed under the same license as OpenJDK, GPL v2 + the Classpath 

This project is preliminary, and the API is subject to change. The library 
produced by compiling this project is used by the FindBugs project. To avoid 
any licensing questions due to incompatible licenses (FindBugs is licensed 
under the LGPL), it is broken out as a separate project. While there may be 
some confusion/discussion about the licenses, the FindBugs project does not 
interpret the FindBugs LGPL license to be any stronger than GPL v2 + the 
Classpath exception.

%package javadoc
License:        GPLv2
Summary:        Javadoc for %{name}
Group:          Development/Documentation
Requires:       java-javadoc

%description javadoc
Javadoc for %{name}.

%setup -q

mkdir lib
pushd lib
%{__ln_s} $(build-classpath junit4)

export OPT_JAR_LIST=:
%{javadoc} -d javadoc \
           -source 1.5 \
           -sourcepath src/java \
           -classpath build/classes:$(build-classpath junit4) \
           -link %{_javadocdir}/java \

%{__rm} -rf %{buildroot}

%{__mkdir_p} %{buildroot}%{_javadir}
%{__cp} -p build/jFormatString.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
%{__ln_s} %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
%{__ln_s} %{name}-%{version}.jar %{buildroot}%{_javadir}/jFormatString-%{version}.jar
%{__ln_s} jFormatString-%{version}.jar %{buildroot}%{_javadir}/jFormatString.jar

%{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version}
%{__cp} -pr javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
%{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/jFormatString-%{version}
%{__ln_s} jFormatString-%{version} %{buildroot}%{_javadocdir}/jFormatString

%if %{gcj_support}

%{__rm} -rf %{buildroot}

%if %{gcj_support}

if [ -x %{_bindir}/rebuild-gcj-db ]; then

if [ -x %{_bindir}/rebuild-gcj-db ]; then

%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/*

%files javadoc

openSUSE Build Service is sponsored by