Blob Blame History Raw
%define eclipse_base %{_libdir}/eclipse
%define install_loc  %{_datadir}/eclipse/dropins/eclemma

Name:      eclipse-eclemma
Version:   1.3.2
Release:   5%{?dist}
Summary:   Java code coverage tool plugin for Eclipse
Group:     Development/Tools
License:   EPL and ASL 2.0
URL:       http://www.eclemma.org

# Source tarball and script used to generate it
# $ sh ./get-eclemma.sh
Source0:   eclemma-%{version}.tar.bz2
Source1:   get-eclemma.sh
Source2:   http://www.apache.org/licenses/LICENSE-2.0
# Unpack the emma-including plugin so we can symlink to our JAR
Patch0:    %{name}-unjar.patch
Patch1:    %{name}-unjar-2.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:        noarch
BuildRequires:    java-devel
BuildRequires:    jpackage-utils
BuildRequires:    eclipse-pde >= 1:3.4.1
BuildRequires:    emma
Requires:         java
Requires:         jpackage-utils
Requires:         eclipse-jdt >= 1:3.4.1
Requires:         emma
Provides:         eclemma = %{version}-%{release}

%description
EclEmma is a Java code coverage tool for Eclipse based on the EMMA Java
code coverage tool.  Features include launching from within the IDE,
coverage analysis summaries, and highlighting in Java source code
editors.

%prep
%setup -q -n eclemma-%{version}
%patch0
%patch1
rm com.mountainminds.eclemma.core/emma.jar
build-jar-repository -s -p com.mountainminds.eclemma.core emma.jar
cp -rp %{SOURCE2} .

%build
%{eclipse_base}/buildscripts/pdebuild

%install
rm -rf %{buildroot}
install -d -m 755 %{buildroot}/%{install_loc}
unzip -q -o -d %{buildroot}/%{install_loc} \
  build/rpmBuild/com.mountainminds.eclemma.feature.zip
pushd %{buildroot}/%{install_loc}/eclipse/plugins
#build-jar-repository -s -p com.mountainminds.eclemma.core_%{version} emma.jar
rm com.mountainminds.eclemma.core_%{version}/emma.jar
ln -s ../../../../../../java/emma.jar com.mountainminds.eclemma.core_%{version}
popd

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc com.mountainminds.eclemma.doc/pages/faq.html
%doc com.mountainminds.eclemma.doc/pages/license.html
%doc com.mountainminds.eclemma.core/about.html
%doc LICENSE-2.0
%{install_loc}

%changelog
* Mon Mar 23 2009 Alexander Kurtakov <akurtako@redhat.com> 1.3.2-5
- Rebuild to not ship p2 context.xml.

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Dec 03 2008 Andrew Overholt <overholt@redhat.com> 1.3.2-3
- More updates for review (rhbz#444512).
- Add text of Apache license to cover annotations example.

* Wed Dec 03 2008 Andrew Overholt <overholt@redhat.com> 1.3.2-2
- Updates for review (rhbz#444512).

* Thu Oct 16 2008 Alexander Kurtakov <akurtako@redhat.com> 1.3.2-1
- Update to 1.3.2.
- Fix build for eclipse 3.4.

* Fri Apr 25 2008 Andrew Overholt <overholt@redhat.com> 1.3.1-1
- Initial package.