diff --git a/.cvsignore b/.cvsignore index e69de29..3d33e15 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +emf-query-1.3.0.tar.gz diff --git a/eclipse-emf-query.spec b/eclipse-emf-query.spec new file mode 100644 index 0000000..bd85a41 --- /dev/null +++ b/eclipse-emf-query.spec @@ -0,0 +1,90 @@ +%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 v200906221200 + +Name: eclipse-emf-query +Version: 1.3.0 +Release: 2%{?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 + +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-ocl >= 1.3.0 +Requires: java +Requires: jpackage-utils +Requires: eclipse-platform >= 1:3.5.0 +Requires: eclipse-emf >= 2.5.0 +Requires: eclipse-mdt-ocl >= 1.3.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. + +#TODO - sdk/examples subpackages? + +%prep +%setup -q -n emf-query-%{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-query features +%{eclipse_base}/buildscripts/pdebuild -f org.eclipse.emf.query \ + -d "emf ocl" -a "-DforceContextQualifier=%{contextQualifier}" +%{eclipse_base}/buildscripts/pdebuild -f org.eclipse.emf.query.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-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 + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{eclipse_dropin}/emf-query +%doc org.eclipse.emf.query-feature/rootfiles/* + +%changelog +* Sun Nov 22 2009 Mat Booth 1.3.0-2 +- Don't pretty-print the package description. +- Remove spurious executable permissions from docs. + +* Fri Nov 13 2009 Mat Booth 1.3.0-1 +- New query spec file based on eclipse-gef. diff --git a/get-emf-query.sh b/get-emf-query.sh new file mode 100644 index 0000000..12bc437 --- /dev/null +++ b/get-emf-query.sh @@ -0,0 +1,41 @@ +#!/bin/bash +NAME="emf-query" +VERSION=1.3.0 +TAG="R200906221200" + +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/query/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..110937a 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +f55ce87a31658c7316094d214054031b emf-query-1.3.0.tar.gz