From 06d7844453f4000e24730afc19158381941e009c Mon Sep 17 00:00:00 2001 From: Mohamed El Morabity Date: Feb 14 2017 18:12:14 +0000 Subject: - Build antlrworks using Maven - Spec cleanup - Add AppData file --- diff --git a/antlrworks-1.5.2-build.patch b/antlrworks-1.5.2-build.patch deleted file mode 100644 index 78bc9fa..0000000 --- a/antlrworks-1.5.2-build.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up ./build.xml.orig ./build.xml ---- ./build.xml.orig 2013-10-09 01:50:02.000000000 +0200 -+++ ./build.xml 2014-07-01 23:58:56.341915632 +0200 -@@ -63,9 +63,6 @@ - - - -- -- -- - - - diff --git a/antlrworks.appdata.xml b/antlrworks.appdata.xml new file mode 100644 index 0000000..4db0c71 --- /dev/null +++ b/antlrworks.appdata.xml @@ -0,0 +1,43 @@ + + + + antlrworks.desktop + CC0-1.0 + BSD + ANTLRWorks + Grammar development environment for ANTLR v3 grammars + +

+ ANTLRWorks is a novel grammar development environment for ANTLR v3 + grammars written by Jean Bovet (with suggested use cases from Terence + Parr). It combines an excellent grammar-aware editor with an interpreter + for rapid prototyping and a language-agnostic debugger for isolating + grammar errors. ANTLRWorks helps eliminate grammar nondeterminisms, one of + the most difficult problems for beginners and experts alike, by + highlighting nondeterministic paths in the syntax diagram associated with + a grammar. ANTLRWorks' goal is to make grammars more accessible to the + average programmer, improve maintainability and readability of grammars by + providing excellent grammar navigation and refactoring tools, and address + the most common questions and problems encountered by grammar developers. +

+
+ + + http://www.antlr3.org/works/screenshots/editor.jpg + + + http://www.antlr3.org/works/screenshots/interpreter.png + + + http://www.antlr3.org/works/screenshots/debugger.png + + + http://www.antlr3.org/works/screenshots/ambiguouspath.jpg + + + http://www.antlr3.org/works/screenshots/decisiondfa.jpg + + + http://www.antlr3.org/works/ + melmorabity_at_fedoraproject.org +
diff --git a/antlrworks.spec b/antlrworks.spec index 45c6aa0..01c78f2 100644 --- a/antlrworks.spec +++ b/antlrworks.spec @@ -8,28 +8,25 @@ License: BSD URL: http://www.antlr3.org/works Source0: https://github.com/antlr/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source1: %{name}.desktop -# Disable embedding of dependency jars files into antlrworks jar file -Patch0: %{name}-1.5.2-build.patch +Source2: %{name}.appdata.xml # Fix compilation with JGoodies Forms >= 1.7.1 -Patch1: %{name}-1.5.2-jgoodies-forms_1.7.1.patch +Patch0: %{name}-1.5.2-jgoodies-forms_1.7.1.patch # Add xdg-open to the list of available browsers to open the help -Patch2: %{name}-1.5.2-browsers.patch +Patch1: %{name}-1.5.2-browsers.patch -BuildRequires: ant -BuildRequires: antlr3-tool >= 3.5 BuildRequires: desktop-file-utils -BuildRequires: java-devel >= 1:1.6.0 -BuildRequires: jgoodies-forms >= 1.7.1 -BuildRequires: stringtemplate -BuildRequires: stringtemplate4 -Requires: antlr3-tool >= 3.5 +BuildRequires: libappstream-glib +BuildRequires: maven-local +BuildRequires: mvn(com.jgoodies:jgoodies-forms) +BuildRequires: mvn(org.antlr:antlr) +BuildRequires: mvn(org.antlr:antlr-runtime) +BuildRequires: mvn(org.antlr:stringtemplate) +BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) Requires: graphviz # Owns /usr/share/icons/hicolor Requires: hicolor-icon-theme # Antlrworks requires javac Requires: java-devel >= 1:1.6.0 -Requires: jgoodies-forms >= 1.7.1 -Requires: stringtemplate4 BuildArch: noarch %description @@ -47,27 +44,23 @@ encountered by grammar developers. %prep -%setup -q -%patch0 -p0 -b .build -%patch1 -p0 -b .jgoodies-forms_1.7.1 -%patch2 -p0 -b .browsers +%autosetup -p0 -# Fix version -sed -i "s|^version=.*|version=%{version}|" build.properties +# Remove MacOSX-specific code +rm -r src/org/antlr/xjlib/appkit/app/MacOS/ -# Add JARs to the default classpath folder -mkdir -p lib/ -build-jar-repository -s -p lib/ antlr3-runtime jgoodies-forms stringtemplate stringtemplate4/ST4 +%pom_remove_dep com.apple:AppleJavaExtensions +%pom_change_dep com.jgoodies:forms com.jgoodies:jgoodies-forms %build -ant build -Daw.lib=lib/ -Dantlr3.jar=antlr3-runtime.jar -Djgoodies.jar=jgoodies-forms.jar +%mvn_build -j %install -install -Dpm 0644 dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar +%mvn_install -%jpackage_script org.antlr.works.IDE "-Xmx400m" "" antlrworks:antlr:antlr3:antlr3-runtime:jgoodies-common:jgoodies-forms:stringtemplate:stringtemplate4 %{name} true +%jpackage_script org.antlr.works.IDE "-Xmx400m" "" antlrworks:antlr:antlr3:antlr3-runtime:jgoodies-common:jgoodies-forms:stringtemplate:stringtemplate4 %{name} false desktop-file-install \ --dir=$RPM_BUILD_ROOT%{_datadir}/applications \ @@ -78,10 +71,14 @@ for i in 16 32 64; do install -Dpm 0644 resources/icons/app_${i}x$i.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}x$i/apps/%{name}.png done +install -Dpm 0644 %{SOURCE2} $RPM_BUILD_ROOT/%{_datadir}/appdata/%{name}.appdata.xml + %check desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop +appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml + %post touch --no-create %{_datadir}/icons/hicolor/ &>/dev/null || : @@ -98,17 +95,19 @@ fi gtk-update-icon-cache %{_datadir}/icons/hicolor/ &>/dev/null || : -%files +%files -f .mfiles %doc History.txt %{_bindir}/%{name} %{_datadir}/applications/*.desktop -%{_datadir}/icons/hicolor/*/apps/*.png -%{_javadir}/*.jar +%{_datadir}/icons/hicolor/*/apps/*.* +%{_datadir}/appdata/*.appdata.xml %changelog -* Fri Feb 10 2017 Fedora Release Engineering - 1.5.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild +* Tue Feb 14 2017 Mohamed El Morabity - 1.5.2-5 +- Build antlrworks using Maven +- Spec cleanup +- Add AppData file * Wed Feb 03 2016 Fedora Release Engineering - 1.5.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index b207574..f85a8d9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c70899b2799d7bcfaa26c639a0e51111 antlrworks-1.5.2.tar.gz +SHA512 (antlrworks-1.5.2.tar.gz) = bd8efd77fbe9cb85a6737da6a4abffa7c22d89091f46c85af7d23a6cd62808e7c752461493ef00e9e4f01272c68f560d662946619250be873ae418fe250d4ef1