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-validation
Version:   1.6.0
Release:   1%{?dist}
Summary:   Verify the integrity of EMF models
Group:     System Environment/Libraries
License:   EPL
URL:       http://www.eclipse.org/modeling/emf/?project=validation

# source tarball and the script used to generate it from upstream's source control
# script usage:
# $ sh get-emf-validation.sh
Source0:   emf-validation-%{version}.tar.gz
Source1:   get-emf-validation.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 validation component provides an API for defining constraints for any EMF
meta-model (batch and live constraints), provides an extensibility API to
support meta-models that require custom strategies for model traversal and
provides support for parsing the content of constraint elements defined in
specific languages. The validation framework provides support for two
languages: Java and OCL. It also provides API support to define "client
contexts" that describe the objects that need to be validated and to bind them
to constraints that need to be enforced on these objects and provides support
for listening to validation events.

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

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

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

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

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

%changelog
* Sat Oct 20 2012 Mat Booth <fedora@matbooth.co.uk> - 1.6.0-1
- Update to latest version.
- Adapt to newer packaging guidelines.
- Fix FTBFS bug 843213.
- 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 #631222.

* Tue Nov 24 2009 Mat Booth <fedora@matbooth.co.uk> 1.3.1-2
- Don't pretty-print the package description.

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