# # spec file for package jformatstring # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2000-2009, JPackage Project # # 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 http://bugs.opensuse.org/ # Name: jformatstring Version: 0 Release: 0 Summary: Java library for format string checks License: GPL-2.0-only Group: Development/Libraries/Java Url: https://jformatstring.dev.java.net/ # svn -q export -r 8 https://jformatstring.dev.java.net/svn/jformatstring/trunk/jFormatString jformatstring-0 --username guest --password guest && tar cjf jformatstring-0.tar.bz2 jformatstring-0 Source0: jformatstring-0.tar.bz2 Patch0: jformatstring-sourcetarget.patch BuildRequires: ant BuildRequires: fdupes BuildRequires: java-devel BuildRequires: javapackages-tools BuildRequires: junit Provides: jFormatString = %{version}-%{release} Obsoletes: jFormatString < %{version}-%{release} BuildArch: noarch %description 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 exception. 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 Summary: Javadoc for %{name} # FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines" Group: Development/Documentation Requires: java-javadoc %description javadoc Javadoc for %{name}. %prep %setup -q %patch0 -p1 mkdir -p lib build-jar-repository -s -p lib junit %build export CLASSPATH= export OPT_JAR_LIST=: ant -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 javadoc -notimestamp -d javadoc -source 1.6 \ -sourcepath src/java \ -classpath build/classes:$(build-classpath junit) \ edu.umd.cs.findbugs.formatStringChecker %install 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} %fdupes -s %{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 %files %doc LICENSE %{_javadir}/%{name}-%{version}.jar %{_javadir}/%{name}.jar %{_javadir}/jFormatString-%{version}.jar %{_javadir}/jFormatString.jar %files javadoc %{_javadocdir}/%{name}-%{version} %{_javadocdir}/%{name} %{_javadocdir}/jFormatString-%{version} %{_javadocdir}/jFormatString %changelog