Blob Blame History Raw
%global eclipse_base     %{_libdir}/eclipse
%global eclipse_dropin   %{_datadir}/eclipse/dropins

# Note: Use the tag in get-mdt-ocl.sh as the context qualifier because it's
#       later than the tags of the individual plugins.
%global contextQualifier R201206271200

Name:      eclipse-emf-query
Version:   1.6.0
Release:   1%{?dist}
Summary:   Specify and execute queries against EMF models
Group:     System Environment/Libraries
License:   EPL
URL:       http://www.eclipse.org/modeling/emf/?project=query

# source tarball and the script used to generate it from upstream's source control
# script usage:
# $ sh get-emf-query.sh
Source0:   emf-query-%{version}.tar.gz
Source1:   get-emf-query.sh

BuildArch:        noarch

BuildRequires:    java-devel
BuildRequires:    jpackage-utils
BuildRequires:    eclipse-pde >= 1:4.2.0
BuildRequires:    eclipse-emf >= 2.8.0
BuildRequires:    eclipse-mdt-ocl >= 4.0.0
Requires:         java
Requires:         jpackage-utils
Requires:         eclipse-platform >= 1:4.2.0
Requires:         eclipse-emf >= 2.8.0
Requires:         eclipse-mdt-ocl >= 4.0.0

%description
The query component facilitates the process of search and retrieval of model
elements of interest in a flexible yet controlled and structured manner.
Provides API support for the basic EObject based Condition objects that are
used to formulate queries for EMF models.

%prep
%setup -q -n emf-query-%{version}

# remove spurious exec permissions from docs
find -wholename "*/rootfiles/*" | xargs chmod -x

%build
# build emf-query features
eclipse-pdebuild -f org.eclipse.emf.query \
  -d "../../java/emf emf mdt-ocl" -a "-DforceContextQualifier=%{contextQualifier}"
eclipse-pdebuild -f org.eclipse.emf.query.ocl \
  -d "../../java/emf emf mdt-ocl" -a "-DforceContextQualifier=%{contextQualifier}"
eclipse-pdebuild -f org.eclipse.emf.query.doc \
 -a "-DforceContextQualifier=%{contextQualifier}"

%install
install -d -m 755 %{buildroot}%{eclipse_dropin}
unzip -q -n -d %{buildroot}%{eclipse_dropin}/emf-query build/rpmBuild/org.eclipse.emf.query.zip
unzip -q -n -d %{buildroot}%{eclipse_dropin}/emf-query build/rpmBuild/org.eclipse.emf.query.ocl.zip
unzip -q -n -d %{buildroot}%{eclipse_dropin}/emf-query build/rpmBuild/org.eclipse.emf.query.doc.zip

%files
%{eclipse_dropin}/emf-query
%doc org.eclipse.emf.query-feature/rootfiles/*

%changelog
* Sun Oct 21 2012 Mat Booth <fedora@matbooth.co.uk> - 1.6.0-1
- Update to latest version.
- Adapt to newer packaging guidelines.
- Fix FTBFS bug 843211.
- Include emf from new location during pdebuild.

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Sep 24 2010 Mat Booth <fedora@matbooth.co.uk> 1.4.0-1
- Update to Helios release.
- Fixes RHBZ #631230.

* Sun Nov 22 2009 Mat Booth <fedora@matbooth.co.uk> 1.3.0-2
- Don't pretty-print the package description.
- Remove spurious executable permissions from docs.

* Fri Nov 13 2009 Mat Booth <fedora@matbooth.co.uk> 1.3.0-1
- New query spec file based on eclipse-gef.