69 lines
2.0 KiB
RPMSpec
69 lines
2.0 KiB
RPMSpec
|
|
Name: jFormatString
|
||
|
|
Version: 0
|
||
|
|
Release: 0.31.20131227gitf159b88
|
||
|
|
Summary: A checker for Java format string when compile-time
|
||
|
|
License: GPLv2 with exceptions
|
||
|
|
URL: http://code.google.com/p/j-format-string/
|
||
|
|
|
||
|
|
Source0: https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/j-format-string/source-archive.zip
|
||
|
|
#specify project information and configuration
|
||
|
|
Source1: http://search.maven.org/remotecontent?filepath=com/google/code/findbugs/jFormatString/2.0.2/jFormatString-2.0.2.pom
|
||
|
|
#change build path
|
||
|
|
Patch0001: jFormatString-build.patch
|
||
|
|
BuildRequires: javapackages-local ant java-devel java-1.8.0-javadoc jpackage-utils junit
|
||
|
|
Requires: java-headless jpackage-utils
|
||
|
|
|
||
|
|
BuildArch: noarch
|
||
|
|
|
||
|
|
%description
|
||
|
|
A checker for Java format string when compile-time.
|
||
|
|
|
||
|
|
%package help
|
||
|
|
Summary: Help documentation for jFormatString
|
||
|
|
Requires: java-1.8.0-javadoc
|
||
|
|
Provides: %{name}-javadoc = %{version}-%{release}
|
||
|
|
Obsoletes: %{name}-javadoc < %{version}-%{release}
|
||
|
|
|
||
|
|
%description help
|
||
|
|
Help documentation forjFormatString.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup -n j-format-string-f159b88a16be -p1
|
||
|
|
|
||
|
|
cp %{SOURCE1} pom.xml
|
||
|
|
|
||
|
|
rm -rfv src/junit lib/*
|
||
|
|
|
||
|
|
%build
|
||
|
|
ant jarFile
|
||
|
|
|
||
|
|
mkdir docs
|
||
|
|
javadoc -d docs -source 1.5 -sourcepath src/java -classpath build/classes \
|
||
|
|
-link file://%{_javadocdir}/java edu.umd.cs.findbugs.formatStringChecker
|
||
|
|
|
||
|
|
%install
|
||
|
|
install -Dp build/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||
|
|
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||
|
|
|
||
|
|
%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
||
|
|
|
||
|
|
install -d %{buildroot}%{_javadocdir}/%{name}
|
||
|
|
cp -rp docs/* %{buildroot}%{_javadocdir}/%{name}
|
||
|
|
|
||
|
|
%pretrans help -p <lua>
|
||
|
|
path = "%{_javadocdir}/%{name}"
|
||
|
|
st = posix.stat(path)
|
||
|
|
if st and st.type == "link" then
|
||
|
|
os.remove(path)
|
||
|
|
end
|
||
|
|
|
||
|
|
%files -f .mfiles
|
||
|
|
|
||
|
|
%files help
|
||
|
|
%{_javadocdir}/%{name}*
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Thu Mar 5 2020 wutao<wutao61@huawei.com> - 0.31.20131227gitf159b88
|
||
|
|
- Package init
|