File antlr4.spec of Package antlr4

# spec file for package 
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           antlr4
Version:	4.7.2
Release:	1.1
License:	BSD-3-Clause
Summary:	ANother Tool for Language Recognition
Group:		Development/Tools/Other
BuildRoot:	%{_tmppath}/%{name}-%{version}-build
Requires:	java
BuildArch:	noarch

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator 
for reading, processing, executing, or translating structured text or binary 
files. It's widely used to build languages, tools, and frameworks. From a 
grammar, ANTLR generates a parser that can build and walk parse trees.




install -d $RPM_BUILD_ROOT/usr/share/java/
install -p %{SOURCE0} $RPM_BUILD_ROOT/usr/share/java/
install -p %{SOURCE1} $RPM_BUILD_ROOT/usr/share/java/

#helper scripts
install -d $RPM_BUILD_ROOT/%{_bindir}

echo "#!/bin/sh
java -jar /usr/share/java/antlr-%{version}-complete.jar \$@" > $RPM_BUILD_ROOT/%{_bindir}/antlr4

echo "#!/bin/sh
export CLASSPATH=".:/usr/share/java/antlr-%{version}-complete.jar"
java org.antlr.v4.runtime.misc.TestRig \$@" > $RPM_BUILD_ROOT/%{_bindir}/grun

chmod a+x $RPM_BUILD_ROOT/%{_bindir}/*


openSUSE Build Service is sponsored by