2007-01-15 23:18:36 +00:00
|
|
|
#
|
2008-01-28 15:00:10 +00:00
|
|
|
# spec file for package javacc (Version 4.0)
|
2007-01-15 23:18:36 +00:00
|
|
|
#
|
2008-01-28 15:00:10 +00:00
|
|
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-15 23:18:36 +00:00
|
|
|
# This file and all modifications and additions to the pristine
|
|
|
|
# package are under the same license as the package itself.
|
|
|
|
#
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
Name: javacc
|
|
|
|
BuildRequires: ant java2-devel-packages xml-commons-apis
|
|
|
|
%define section free
|
2008-01-28 15:00:10 +00:00
|
|
|
Version: 4.0
|
|
|
|
Release: 1
|
2007-01-15 23:18:36 +00:00
|
|
|
Summary: A Parser and Scanner Generator for Java
|
2008-01-28 15:00:10 +00:00
|
|
|
License: BSD 3-Clause
|
|
|
|
Source0: %{name}-%{version}src.tar.gz
|
2007-01-15 23:18:36 +00:00
|
|
|
Source1: javacc
|
|
|
|
Source2: jjdoc
|
|
|
|
Source3: jjtree
|
2008-01-28 15:00:10 +00:00
|
|
|
Patch: javacc.patch
|
|
|
|
Url: https://javacc.dev.java.net/
|
2007-01-15 23:18:36 +00:00
|
|
|
Group: Development/Libraries/Java
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: jpackage-utils >= 1.5
|
|
|
|
|
|
|
|
%description
|
|
|
|
Java Compiler Compiler (JavaCC) is the most popular parser generator
|
|
|
|
for use with Java applications. A parser generator is a tool that reads
|
|
|
|
a grammar specification and converts it to a Java program that can
|
|
|
|
recognize matches to the grammar. In addition to the parser generator
|
|
|
|
itself, JavaCC provides other standard capabilities related to parser
|
|
|
|
generation such as tree building (via a tool called JJTree included
|
|
|
|
with JavaCC), actions, debugging, etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package manual
|
|
|
|
Summary: A Parser and Scanner Generator for Java
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description manual
|
|
|
|
Java Compiler Compiler (JavaCC) is the most popular parser generator
|
|
|
|
for use with Java applications. A parser generator is a tool that reads
|
|
|
|
a grammar specification and converts it to a Java program that can
|
|
|
|
recognize matches to the grammar. In addition to the parser generator
|
|
|
|
itself, JavaCC provides other standard capabilities related to parser
|
|
|
|
generation such as tree building (via a tool called JJTree included
|
|
|
|
with JavaCC), actions, debugging, etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package demo
|
|
|
|
Summary: A Parser and Scanner Generator for Java
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description demo
|
|
|
|
Java Compiler Compiler (JavaCC) is the most popular parser generator
|
|
|
|
for use with Java applications. A parser generator is a tool that reads
|
|
|
|
a grammar specification and converts it to a Java program that can
|
|
|
|
recognize matches to the grammar. In addition to the parser generator
|
|
|
|
itself, JavaCC provides other standard capabilities related to parser
|
|
|
|
generation such as tree building (via a tool called JJTree included
|
|
|
|
with JavaCC), actions, debugging, etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2008-01-28 15:00:10 +00:00
|
|
|
%setup -n javacc
|
|
|
|
%patch -p1
|
2007-01-15 23:18:36 +00:00
|
|
|
cp %{SOURCE1} javacc
|
|
|
|
cp %{SOURCE2} jjdoc
|
|
|
|
cp %{SOURCE3} jjtree
|
|
|
|
mv www/doc .
|
|
|
|
|
|
|
|
%build
|
|
|
|
for file in `find -name build.xml` ; do
|
|
|
|
if ! grep -q "javac.*source=" $file ; then
|
|
|
|
perl -p -i -e 's|<javac |<javac source=\"1.4\" |' $file
|
2008-01-28 15:00:10 +00:00
|
|
|
perl -p -i -e 's|<javadoc |<javadoc source=\"1.4" |' $file
|
2007-01-15 23:18:36 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
ant \
|
|
|
|
-Dversion=%{version} \
|
|
|
|
jar
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
|
|
|
install -m 644 bin/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
|
|
|
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/usr/bin
|
|
|
|
install -m 755 javacc jjdoc jjtree $RPM_BUILD_ROOT/usr/bin
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/usr/share/%{name}
|
|
|
|
cp -pr examples $RPM_BUILD_ROOT/usr/share/%{name}
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_javadir}/*.jar
|
|
|
|
%doc LICENSE README
|
|
|
|
%defattr(0755,root,root,0755)
|
|
|
|
/usr/bin/*
|
|
|
|
|
|
|
|
%files manual
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc doc/*
|
|
|
|
|
|
|
|
%files demo
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
/usr/share/%{name}/
|
|
|
|
|
2008-01-28 15:00:10 +00:00
|
|
|
%changelog
|
|
|
|
* Mon Jan 28 2008 mmaher@suse.de
|
|
|
|
- updated to 4.0:
|
|
|
|
See the bug list in issue tracker for all the bugs fixed in this release.
|
|
|
|
JJTree and JavaCC both now support 1.5 syntax.
|
|
|
|
We now support accessing token fields in the grammar like: s=<ID>.image
|
|
|
|
Convenient constructors for passing encoding directly to the grammar
|
|
|
|
Tabsetting is now customizable.
|
|
|
|
SimpleNode can now extend a class using the NODE_EXTENDS option.
|
|
|
|
JAVACODE and BNF productions take optional access modifiers.
|
|
|
|
* Wed Sep 20 2006 ro@suse.de
|
2007-01-15 23:18:36 +00:00
|
|
|
- set source=1.4 for java
|
2008-01-28 15:00:10 +00:00
|
|
|
* Wed Jan 25 2006 mls@suse.de
|
2007-01-15 23:18:36 +00:00
|
|
|
- converted neededforbuild to BuildRequires
|
2008-01-28 15:00:10 +00:00
|
|
|
* Tue Oct 18 2005 jsmeix@suse.de
|
2007-01-15 23:18:36 +00:00
|
|
|
- Current version 3.2 from JPackage.org
|
2008-01-28 15:00:10 +00:00
|
|
|
* Thu Sep 29 2005 dmueller@suse.de
|
2007-01-15 23:18:36 +00:00
|
|
|
- add norootforbuild
|
2008-01-28 15:00:10 +00:00
|
|
|
* Fri Feb 18 2005 skh@suse.de
|
2007-01-15 23:18:36 +00:00
|
|
|
- initial package
|