packages java-jsr-305.spec
      Pages: < 1 >  DOWNLOAD      
%define        anthome /usr/share/ant
Name:          java-jsr-305
Version:       0
Release:       2mamba
Summary:       Annotations for Software Defect Detection in Java
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://jsr-305.googlecode.com/
# svn export -r 48 http://jsr-305.googlecode.com/svn/trunk jsr-305
# tar -cjvf jsr-305-0.2.20090314.tar.bz2 jsr-305
Source:        jsr-305-0.2.20090314.tar.bz2
License:       BSD
BuildRequires: apache-ant
BuildRequires: sun-java
BuildRequires: jpackage-utils
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
This project contains reference implementations, test cases, and other
documents under source code control for Java Specification Request 305:
Annotations for Software Defect Detection. More information at the Google
group: http://groups.google.com/group/jsr-305.

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

%description    javadoc
This project contains reference implementations, test cases, and other
documents under source code control for Java Specification Request 305:
Annotations for Software Defect Detection. More information at the Google
group: http://groups.google.com/group/jsr-305.

This package contains javadoc for %{name}.

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

%description    src
This project contains reference implementations, test cases, and other
documents under source code control for Java Specification Request 305:
Annotations for Software Defect Detection. More information at the Google
group: http://groups.google.com/group/jsr-305.

This package contains %{name} source code.

%prep

%setup -q -n jsr-305
for j in $(find . -name "*.jar"); do
	mv $j $j.no
done
for i in `find javadoc -iname "*.html"`; do 
	sed -i 's/\r//' $i
done
for i in `find javadoc -iname "*.css"`; do 
	sed -i 's/\r//' $i
done
for i in `find javadoc -iname "*.bib"`; do
	sed  -i 's/\r//' $i
done
%build
export OPT_JAR_LIST=:
export CLASSPATH=
pushd ri
	%anthome/bin/ant -Dversion=%{version} -Djava.javadoc=%{_javadocdir}/java

popd

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}
install -p -m 644 ri/build/jsr305.jar \
	%{buildroot}%{_javadir}/jsr-305-%{version}.jar

pushd %{buildroot}%{_javadir}
	ln -sf jsr-305-%{version}.jar jsr305-%{version}.jar
popd

mkdir -p %{buildroot}%{_datadir}/jsr-305
install -p -m 644 ri/build/jsr305-src.jar \
	%{buildroot}%{_datadir}/jsr-305/jsr-305-src-%{version}.jar

(
	cd %{buildroot}%{_javadir}
	for jar in *-%{version}*; do
		ln -sf ${jar} ${jar/-%{version}/}
	done
)

mkdir -p %{buildroot}%{_javadocdir}/jsr-305-%{version}
cp -pr javadoc/* %{buildroot}%{_javadocdir}/jsr-305-%{version}
ln -s  jsr-305-%{version} %{buildroot}%{_javadocdir}/jsr-305

#%{_bindir}/aot-compile-rpm

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_javadir}/jsr-305-%{version}.jar
%{_javadir}/jsr-305.jar
%{_javadir}/jsr305-%{version}.jar
%{_javadir}/jsr305.jar
%doc Readme.rtf ri/LICENSE

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/jsr-305-%{version}
%{_javadocdir}/jsr-305

%files src
%defattr(-,root,root)
%{_datadir}/jsr-305

%changelog
* Thu Nov 04 2010 gil <puntogil@...> 0-2mamba
- rebuilt devel

* Sat Mar 14 2009 gil <puntogil@...> 0-1mamba
- package created by autospec