antlrworks/antlrworks.spec

77 lines
2.9 KiB
RPMSpec

Name: antlrworks
Version: 2.1
Release: 1mamba
Summary: The ANTLR GUI Development Environment
Group: Graphical Desktop/Applications/Development
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://tunnelvisionlabs.com/products/demo/antlrworks
Source0: http://tunnelvisionlabs.com/downloads/antlr/2013-07-21-antlrworks-%{version}.zip
Source1: antlrworks-script
Source2: antlrworks.desktop
Source3: https://github.com/antlr/antlrworks/raw/master/resources/icons/app.png
Patch0: antlrworks-1.4-build_xml.patch
Patch1: antlrworks-1.4-BrowserLauncher.patch
License: BSD
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: javapackages
Requires: java-environment
#Requires: antlr
Requires: graphviz
%description
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.
%prep
%setup -q -c %{name}-%{version}
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
cd antlrworks2
mkdir -p %{buildroot}/{etc,usr/{share/antlrworks,bin}}
chmod +x bin/antlrworks2
cp -r * %{buildroot}%{_datadir}/antlrworks
ln -s ../share/antlrworks/bin/antlrworks2 %{buildroot}%{_bindir}/antlrworks
rm -f %{buildroot}%{_bindir}/antlrworks*.exe
install -D -pm 644 %{SOURCE2} %{buildroot}%{_datadir}/applications/antlrworks.desktop
install -D -pm 644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/antlrworks.png
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%defattr(-,root,root)
%{_bindir}/antlrworks
%dir %{_datadir}/antlrworks
%{_datadir}/antlrworks/*
%{_datadir}/applications/antlrworks.desktop
%{_datadir}/pixmaps/antlrworks.png
%changelog
* Sat Apr 10 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1-1mamba
- update to 2.1
* Thu Nov 25 2010 gil <puntogil@libero.it> 1.4-1mamba
- package created by autospec