diff --git a/.cvsignore b/.cvsignore index e69de29..377f383 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +emf-validation-1.3.1.tar.gz diff --git a/eclipse-emf-validation.spec b/eclipse-emf-validation.spec new file mode 100644 index 0000000..891d7d9 --- /dev/null +++ b/eclipse-emf-validation.spec @@ -0,0 +1,94 @@ +%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 v200909151245 + +Name: eclipse-emf-validation +Version: 1.3.1 +Release: 2%{?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 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch + +BuildRequires: java-devel +BuildRequires: jpackage-utils +BuildRequires: eclipse-pde >= 1:3.5.1 +BuildRequires: eclipse-emf >= 2.5.0 +BuildRequires: eclipse-mdt-ocl >= 1.3.0 +Requires: java +Requires: jpackage-utils +Requires: eclipse-platform >= 1:3.5.1 +Requires: eclipse-emf >= 2.5.0 +Requires: eclipse-mdt-ocl >= 1.3.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. + +#TODO - sdk/examples subpackages? + +%prep +%setup -q -n emf-validation-%{version} + +# make sure upstream hasn't sneaked in any jars we don't know about +JARS="" +for j in `find -name "*.jar"`; do + if [ ! -L $j ]; then + JARS="$JARS $j" + fi +done +if [ ! -z "$JARS" ]; then + echo "These jars should be deleted and symlinked to system jars: $JARS" + exit 1 +fi + +# remove spurious exec permissions from docs +find -wholename "*/rootfiles/*" | xargs chmod -x + +%build +# build emf-validation features +%{eclipse_base}/buildscripts/pdebuild -f org.eclipse.emf.validation \ + -d "emf ocl" -a "-DforceContextQualifier=%{contextQualifier}" +%{eclipse_base}/buildscripts/pdebuild -f org.eclipse.emf.validation.ocl \ + -d "emf ocl" -a "-DforceContextQualifier=%{contextQualifier}" + +%install +rm -rf %{buildroot} +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 + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{eclipse_dropin}/emf-validation +%doc org.eclipse.emf.validation-feature/rootfiles/* + +%changelog +* Tue Nov 24 2009 Mat Booth 1.3.1-2 +- Don't pretty-print the package description. + +* Fri Nov 13 2009 Mat Booth 1.3.1-1 +- New Validation spec file based on eclipse-gef. diff --git a/get-emf-validation.sh b/get-emf-validation.sh new file mode 100644 index 0000000..ced3f62 --- /dev/null +++ b/get-emf-validation.sh @@ -0,0 +1,41 @@ +#!/bin/bash +NAME="emf-validation" +VERSION=1.3.1 +TAG="R200909151245" + +echo "Exporting from CVS..." +mkdir $NAME-$VERSION +pushd $NAME-$VERSION >/dev/null + +MAPFILE=$NAME.map +TEMPMAPFILE=temp.map +wget "http://download.eclipse.org/modeling/emf/validation/downloads/drops/$VERSION/$TAG/directory.txt" -O $MAPFILE +dos2unix $MAPFILE +grep ^[a-z] $MAPFILE > $TEMPMAPFILE + +gawk 'BEGIN { + FS="," +} +{ +if (NF < 4) { + + split($1, version, "="); + split(version[1], directory, "@"); + cvsdir=split($2, dirName, ":"); + printf("cvs -d %s%s %s %s %s %s %s\n", ":pserver:anonymous@dev.eclipse.org:", dirName[cvsdir], "-q export -r", version[2], "-d", directory[2], directory[2]) | "/bin/bash"; +} +else { + + split($1, version, "="); + total=split($4, directory, "/"); + cvsdir=split($2, dirName, ":"); + printf("cvs -d %s%s %s %s %s %s %s\n", ":pserver:anonymous@dev.eclipse.org:", dirName[cvsdir], "-q export -r", version[2], "-d", directory[total], $4) | "/bin/bash"; +} + +}' $TEMPMAPFILE + +rm $TEMPMAPFILE $MAPFILE +popd >/dev/null + +echo "Creating tarball '$NAME-$VERSION.tar.gz'..." +tar -czf $NAME-$VERSION.tar.gz $NAME-$VERSION diff --git a/sources b/sources index e69de29..d605e27 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +45b82ead12ae3810fc97784c63c78394 emf-validation-1.3.1.tar.gz