[jFormatString] Build using source from new Google Code j-format-string project
richardfearn
richardfearn at fedoraproject.org
Fri Dec 27 21:51:30 UTC 2013
commit 8913c646f16569566d7805568dab092448e468fb
Author: Richard Fearn <richardfearn at gmail.com>
Date: Fri Dec 27 21:34:58 2013 +0000
Build using source from new Google Code j-format-string project
See https://mailman.cs.umd.edu/pipermail/findbugs-discuss/2013-November/003928.html
.gitignore | 1 +
jFormatString-build.patch | 26 ++++++++++------------
jFormatString.spec | 52 ++++++++++++++++++--------------------------
sources | 3 +-
4 files changed, 35 insertions(+), 47 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9cc375b..b21940a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
jFormatString-0.tar.bz2
/jFormatString.jar
+/f159b88a16be4d103c7e7beb90e07a92617980b9.zip
diff --git a/jFormatString-build.patch b/jFormatString-build.patch
index caf27e3..20d345a 100644
--- a/jFormatString-build.patch
+++ b/jFormatString-build.patch
@@ -1,14 +1,12 @@
-diff -dur jformatstring.ORIG/jFormatString/build.xml jformatstring/jFormatString/build.xml
---- jformatstring.ORIG/jFormatString/build.xml 2008-10-15 23:22:04.000000000 -0600
-+++ jformatstring/jFormatString/build.xml 2008-12-09 11:02:19.000000000 -0700
-@@ -2,9 +2,7 @@
- <project name="jFormatString" default="build">
-
-
--<path id="compileClasspath">
-- <fileset dir="lib"/>
-- </path>
-+<path id="compileClasspath" path="/usr/share/java/junit4.jar"/>
-
- <target name="build" depends="clean,jarFile"/>
-
+diff --git a/build.xml b/build.xml
+index 8334226..51930c5 100644
+--- a/build.xml
++++ b/build.xml
+@@ -18,7 +18,6 @@
+ <javac destdir="build/classes" source="1.5" target="1.5" debug="on"
+ includeantruntime="false">
+ <src path="src/java" />
+- <src path="src/junit" />
+ <classpath>
+ <pathelement location="build/classes" />
+ </classpath>
diff --git a/jFormatString.spec b/jFormatString.spec
index b61ec2a..778c711 100644
--- a/jFormatString.spec
+++ b/jFormatString.spec
@@ -1,28 +1,19 @@
+%global commit f159b88a16be4d103c7e7beb90e07a92617980b9
+%global shortcommit %(c=%{commit}; echo ${c:0:12})
+
Name: jFormatString
Version: 0
-Release: 0.11.20111215svn%{?dist}
+Release: 0.12.20131227git%{?dist}
Summary: Java format string compile-time checker
Group: Development/Libraries
License: GPLv2 with exceptions
-URL: http://findbugs.sourceforge.net/
-
-# There has been no official release yet. This is a snapshot of the Subversion
-# repository as of 16 Oct 2008. Use the following commands to generate the
-# tarball:
-# svn export -r 8 https://jformatstring.dev.java.net/svn/jformatstring/trunk \
-# jformatstring --username guest
-# (The password is "guest".)
-# tar -cjvf jFormatString-0.tar.bz2 jformatstring
-Source0: %{name}-%{version}.tar.bz2
-
-# This patch has not been sent upstream, since it is Fedora specific. This
-# gives the build system the path to the appropriate junit jar.
-Patch0: %{name}-build.patch
+URL: http://code.google.com/p/j-format-string/
-# This is the jFormatString JAR file shipped with FindBugs 2.0.2:
-# http://code.google.com/p/findbugs/source/browse/trunk/findbugs/lib/jFormatString.jar
-Source1: %{name}.jar
+Source0: http://j-format-string.googlecode.com/archive/%{commit}.zip
+
+# This patch has not been sent upstream, since it is Fedora specific.
+Patch0: %{name}-build.patch
BuildRequires: ant, java-devel, java-javadoc, jpackage-utils, junit4
Requires: java, jpackage-utils
@@ -44,33 +35,30 @@ Requires: jpackage-utils
This package contains the API documentation for %{name}.
%prep
-%setup -q -n jformatstring
+%setup -q -n j-format-string-%{shortcommit}
%patch0 -p1
-# delete old source code
-find jFormatString/src -name "*.java" -print -delete
+# delete test code - it requires FindBugs to compile
+rm -rfv src/junit
-# unpack new source code
-unzip %SOURCE1 -d jFormatString/src/java -x *.class META-INF/*
+# delete JARs
+rm -v lib/*
%build
# Build the JAR
-cd jFormatString
-ant
-cd ..
+ant jarFile
# Create the javadocs
mkdir docs
-javadoc -d docs -source 1.5 -sourcepath jFormatString/src/java \
- -classpath jFormatString/build/classes:%{_javadir}/junit4.jar \
+javadoc -d docs -source 1.5 -sourcepath src/java \
+ -classpath build/classes \
-link file://%{_javadocdir}/java edu.umd.cs.findbugs.formatStringChecker
%install
# JAR files
mkdir -p %{buildroot}%{_javadir}
-cp -p %{name}/build/%{name}.jar \
- %{buildroot}%{_javadir}/%{name}.jar
+cp -p build/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
# Javadocs
mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
@@ -78,13 +66,15 @@ cp -rp docs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
%files
-%doc www/index.html jFormatString/LICENSE
%{_javadir}/%{name}*
%files javadoc
%{_javadocdir}/%{name}*
%changelog
+* Fri Dec 27 2013 Richard Fearn <richardfearn at gmail.com> - 0.12.20131227git
+- Build using source from new Google Code j-format-string project
+
* Mon Sep 09 2013 Richard Fearn <richardfearn at gmail.com> - 0-0.11.20111215svn
- Update to version shipped with FindBugs 2.0.2 (again)
diff --git a/sources b/sources
index 565a684..aa4145d 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-0bd082f8d7000eeb5634fa7d63b34ee0 jFormatString-0.tar.bz2
-a54a527bb715d214c70193a37aa568f4 jFormatString.jar
+62162f02571215ae14ebb9877379647a f159b88a16be4d103c7e7beb90e07a92617980b9.zip
More information about the scm-commits
mailing list