From 377ca73a5aedea229942769f022073dc857805f2 Mon Sep 17 00:00:00 2001 From: mbooth Date: Dec 01 2009 20:04:57 +0000 Subject: - Use build-classpath when symlinking to dependent bundles. - Don't pretty-print the package description. Tue Nov 8 2009 Mat Booth 1.3.0-1 - New OCL spec file based on eclipse-gef. --- diff --git a/.cvsignore b/.cvsignore index e69de29..3fd24c0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +mdt-ocl-1.3.0.tar.gz diff --git a/eclipse-mdt-ocl.spec b/eclipse-mdt-ocl.spec new file mode 100644 index 0000000..7e2269f --- /dev/null +++ b/eclipse-mdt-ocl.spec @@ -0,0 +1,111 @@ +%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 v200906151742 + +Name: eclipse-mdt-ocl +Version: 1.3.0 +Release: 2%{?dist} +Summary: Implementation of the OCL OMG metamodel for Eclipse +Group: System Environment/Libraries +License: EPL +URL: http://www.eclipse.org/modeling/mdt/ocl + +# source tarball and the script used to generate it from upstream's source control +# script usage: +# $ sh get-mdt-ocl.sh +Source0: mdt-ocl-%{version}.tar.gz +Source1: get-mdt-ocl.sh + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch + +BuildRequires: java-devel +BuildRequires: jpackage-utils +BuildRequires: eclipse-pde >= 1:3.5.0 +BuildRequires: eclipse-emf >= 2.5.0 +BuildRequires: eclipse-mdt-uml2 >= 3.0.0 +BuildRequires: lpg-java-compat = 1.1.0 +Requires: java +Requires: jpackage-utils +Requires: eclipse-platform >= 1:3.5.0 +Requires: eclipse-emf >= 2.5.0 +Requires: eclipse-mdt-uml2 >= 3.0.0 +Requires: lpg-java-compat = 1.1.0 + +%description +OCL is an implementation of the Object Constraint Language (OCL) OMG standard +for EMF-based models. The objectives of the OCL component are to provide APIs +for parsing and evaluating OCL constraints and queries on EMF models, an Ecore +implementation of the OCL abstract syntax model, including support for +serialization of parsed OCL expressions, a Visitor API for analyzing/ +transforming the AST model of OCL expressions and an extensibility API for +clients to customize the parsing and evaluation environments used by the +parser. + +#TODO - sdk/examples subpackages? + +%prep +%setup -q -n mdt-ocl-%{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 + +mkdir orbitDeps +pushd orbitDeps +ln -s $(build-classpath lpgjavaruntime) net.sourceforge.lpg.lpgjavaruntime_1.1.0.jar +popd + +# remove spurious exec permissions from docs +find -wholename "*/rootfiles/*" | xargs chmod -x + +%build +# build mdt-ocl features +%{eclipse_base}/buildscripts/pdebuild -f org.eclipse.ocl \ + -d "emf uml2" -o `pwd`/orbitDeps -a "-DforceContextQualifier=%{contextQualifier}" +%{eclipse_base}/buildscripts/pdebuild -f org.eclipse.ocl.uml \ + -d "emf uml2" -o `pwd`/orbitDeps -a "-DforceContextQualifier=%{contextQualifier}" +%{eclipse_base}/buildscripts/pdebuild -f org.eclipse.emf.ocl \ + -d "emf uml2" -o `pwd`/orbitDeps -a "-DforceContextQualifier=%{contextQualifier}" + +%install +rm -rf %{buildroot} +install -d -m 755 %{buildroot}%{eclipse_dropin} +unzip -q -n -d %{buildroot}%{eclipse_dropin}/mdt-ocl build/rpmBuild/org.eclipse.ocl.zip +unzip -q -n -d %{buildroot}%{eclipse_dropin}/mdt-ocl build/rpmBuild/org.eclipse.ocl.uml.zip +unzip -q -n -d %{buildroot}%{eclipse_dropin}/mdt-ocl build/rpmBuild/org.eclipse.emf.ocl.zip + +# use system bundles +pushd %{buildroot}%{eclipse_dropin}/mdt-ocl/eclipse/plugins +rm net.sourceforge.lpg.lpgjavaruntime_*.jar +ln -s ../../../../../../..$(build-classpath lpgjavaruntime) \ + net.sourceforge.lpg.lpgjavaruntime_1.1.0.jar +popd + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{eclipse_dropin}/mdt-ocl +%doc org.eclipse.ocl-feature/rootfiles/* + +%changelog +* Sun Nov 22 2009 Mat Booth 1.3.0-2 +- Use build-classpath when symlinking to dependent bundles. +- Don't pretty-print the package description. + +* Tue Nov 8 2009 Mat Booth 1.3.0-1 +- New OCL spec file based on eclipse-gef. diff --git a/get-mdt-ocl.sh b/get-mdt-ocl.sh new file mode 100644 index 0000000..5f71ed4 --- /dev/null +++ b/get-mdt-ocl.sh @@ -0,0 +1,41 @@ +#!/bin/bash +NAME="mdt-ocl" +VERSION=1.3.0 +TAG="R200906151742" + +echo "Exporting from CVS..." +mkdir $NAME-$VERSION +pushd $NAME-$VERSION >/dev/null + +MAPFILE=$NAME.map +TEMPMAPFILE=temp.map +wget "http://download.eclipse.org/modeling/mdt/ocl/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..fc7d9fa 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +25f703eae6e4b3a4858dd546760d305f mdt-ocl-1.3.0.tar.gz