File multithreadedtc.spec of Package multithreadedtc
%global bootstrap 1
%global _mavenpomdir /usr/share/maven2/poms
%global _mavendepmapfragdir /etc/maven/fragments
%global project_name MultithreadedTC
Name: multithreadedtc
Version: 1.01
Release: 7%{?dist}
Summary: A framework for testing concurrent Java application
Group: Development/Libraries
License: BSD
URL: http://www.cs.umd.edu/projects/PL/multithreadedtc
#http://multithreadedtc.googlecode.com/files/MultithreadedTC-1.01-source.zip
Source0: %{project_name}-%{version}-source.zip
Source1: %{name}.pom
Patch0: %{name}-build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: junit
BuildRequires: unzip
Requires: java
Requires: jpackage-utils
Requires: junit
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
%description
MultithreadedTC is a framework for testing concurrent applications.
It features a metronome that is used to provide fine control over
the sequence of activities in multiple threads.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
Requires: jpackage-utils
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n %{project_name}-%{version}-source
%patch0 -p0 -b .sav
rm -f *.jar
sed -i 's/\r//' web/docs/package-list
sed -i 's/\r//' web/docs/stylesheet.css
sed -i 's/\r//' LICENSE.txt
sed -i 's/\r//' README.txt
%build
ant
%install
rm -rf %{buildroot}
# jars
install -d -m 0755 %{buildroot}%{_javadir}
install -m 644 %{project_name}-%{version}.jar %{buildroot}%{_javadir}/%{project_name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; \
do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
%add_to_maven_depmap edu.umd.cs.mtc multithreadedtc %{version} JPP %{project_name}
%add_to_maven_depmap edu.umd.cs.mtc multithreadedtc-jdk14 %{version} JPP %{project_name}
# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 %{SOURCE1} \
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
# javadoc
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr web/docs/* %{buildroot}%{_javadocdir}/%{name}-%{version}/
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
rm -rf web/docs
%post
%update_maven_depmap
%postun
%update_maven_depmap
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt
%{_javadir}/*
%{_mavenpomdir}/
%{_mavendepmapfragdir}/
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog
* Wed Jun 2 2010 Alexander Kurtakov <akurtako@redhat.com> 1.01-7
- BR ant-junit.
* Wed Jun 2 2010 Alexander Kurtakov <akurtako@redhat.com> 1.01-6
- BR/R junit.
* Wed Jun 2 2010 Alexander Kurtakov <akurtako@redhat.com> 1.01-5
- Fix build.xml to really compile sources.
- Fix depmap.
* Thu May 27 2010 Hui Wang <huwang@redhat.com> 1.01-4
- Fix LICENSE and txt README.txt encoding
- Delete jar files in pre section
* Thu May 27 2010 Hui Wang <huwang@redhat.com> 1.01-3
- Add multithreadedtc-jdk14 to maven depmap
* Thu May 27 2010 Hui Wang <huwang@redhat.com> 1.01-2
- Using MultithreadedTC-1.01-source.zip as source0
- Add demap.xml
- Add missing requires
- Remove ls-lR
- Fix description line length
- Add LICENSE.txt README.txt in doc section
- Fix javadoc encoding
* Tue May 25 2010 Hui Wang <huwang@redhat.com> 1.01-1
- Initial version of the package