Matt Wringe d2ea969
# Copyright (c) 2000-2005, JPackage Project
Matt Wringe d2ea969
# All rights reserved.
Matt Wringe d2ea969
#
Matt Wringe d2ea969
# Redistribution and use in source and binary forms, with or without
Matt Wringe d2ea969
# modification, are permitted provided that the following conditions
Matt Wringe d2ea969
# are met:
Matt Wringe d2ea969
#
Matt Wringe d2ea969
# 1. Redistributions of source code must retain the above copyright
Matt Wringe d2ea969
#    notice, this list of conditions and the following disclaimer.
Matt Wringe d2ea969
# 2. Redistributions in binary form must reproduce the above copyright
Matt Wringe d2ea969
#    notice, this list of conditions and the following disclaimer in the
Matt Wringe d2ea969
#    documentation and/or other materials provided with the
Matt Wringe d2ea969
#    distribution.
Matt Wringe d2ea969
# 3. Neither the name of the JPackage Project nor the names of its
Matt Wringe d2ea969
#    contributors may be used to endorse or promote products derived
Matt Wringe d2ea969
#    from this software without specific prior written permission.
Matt Wringe d2ea969
#
Matt Wringe d2ea969
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Matt Wringe d2ea969
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Matt Wringe d2ea969
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Matt Wringe d2ea969
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Matt Wringe d2ea969
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Matt Wringe d2ea969
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Matt Wringe d2ea969
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Matt Wringe d2ea969
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Matt Wringe d2ea969
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Matt Wringe d2ea969
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Matt Wringe d2ea969
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Matt Wringe d2ea969
#
Matt Wringe d2ea969
Matt Wringe d2ea969
%define _with_gcj_support 1
Matt Wringe d2ea969
Matt Wringe d2ea969
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
Matt Wringe d2ea969
cvsdist 548c7a8
%define section free
cvsdist 548c7a8
cvsdist 548c7a8
Name:           javacc
Matt Wringe d2ea969
Version:        4.0
Matt Wringe 3f437df
Release:        3jpp.3
cvsdist 548c7a8
Epoch:          0
cvsdist 548c7a8
Summary:        A parser/scanner generator for java
cvsdist 548c7a8
License:        BSD
Matt Wringe d2ea969
Source0:	javacc-4.0src-RHCLEAN.tar.gz
cvsdist 548c7a8
Source1:	javacc
cvsdist 548c7a8
Source2:	jjdoc
cvsdist 548c7a8
Source3:	jjtree
cvsdist 548c7a8
URL:            https://javacc.dev.java.net/
cvsdist 548c7a8
Group:          Development/Code Generators
cvsdist 548c7a8
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Matt Wringe d2ea969
%if ! %{gcj_support}
Matt Wringe d2ea969
BuildArch:      noarch
Matt Wringe d2ea969
%endif
cvsdist 548c7a8
Requires:	jpackage-utils >= 0:1.5
Matt Wringe e96fdf4
BuildRequires:	ant, /bin/bash, ant-junit, junit >= 0:3.8.1
Matt Wringe d2ea969
Matt Wringe d2ea969
%if %{gcj_support}
Matt Wringe d2ea969
BuildRequires:		java-gcj-compat-devel
Matt Wringe d2ea969
Requires(post):		java-gcj-compat
Matt Wringe d2ea969
Requires(postun):	java-gcj-compat
Matt Wringe d2ea969
%endif
cvsdist 548c7a8
cvsdist 548c7a8
%description 
cvsdist 548c7a8
Java Compiler Compiler (JavaCC) is the most popular parser generator for use
cvsdist 548c7a8
with Java applications. A parser generator is a tool that reads a grammar
cvsdist 548c7a8
specification and converts it to a Java program that can recognize matches to
cvsdist 548c7a8
the grammar. In addition to the parser generator itself, JavaCC provides other
cvsdist 548c7a8
standard capabilities related to parser generation such as tree building (via
cvsdist 548c7a8
a tool called JJTree included with JavaCC), actions, debugging, etc.
cvsdist 548c7a8
cvsdist 548c7a8
%package manual
cvsdist 548c7a8
Summary:        Manual for %{name}
cvsdist 548c7a8
Group:          Development/Documentation
cvsdist 548c7a8
cvsdist 548c7a8
%description manual
cvsdist 548c7a8
Manual for %{name}.
cvsdist 548c7a8
cvsdist 548c7a8
%package demo
cvsdist 548c7a8
Summary:        Examples for %{name}
cvsdist 548c7a8
Group:          Development/Documentation
cvsdist 548c7a8
cvsdist 548c7a8
%description demo
cvsdist 548c7a8
Examples for %{name}.
cvsdist 548c7a8
cvsdist 548c7a8
%prep
Matt Wringe d2ea969
%setup -q -n %{name}
cvsdist 548c7a8
cp %{SOURCE1} javacc
cvsdist 548c7a8
cp %{SOURCE2} jjdoc
cvsdist 548c7a8
cp %{SOURCE3} jjtree
cvsdist 548c7a8
mv www/doc .
cvsdist 548c7a8
cvsdist 548c7a8
%build
cvsdist 548c7a8
ant \
cvsdist 548c7a8
  -Dversion=%{version} \
cvsdist 548c7a8
  jar
cvsdist 548c7a8
cvsdist 548c7a8
%install
cvsdist 548c7a8
rm -fr $RPM_BUILD_ROOT
cvsdist 548c7a8
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
cvsdist 548c7a8
install -m 644 bin/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
cvsdist 548c7a8
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
Matt Wringe 14214d5
install -d -m 755 $RPM_BUILD_ROOT/%{_bindir}
Matt Wringe 14214d5
install -m 755 javacc jjdoc jjtree $RPM_BUILD_ROOT/%{_bindir}
Matt Wringe 14214d5
install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}
Matt Wringe 14214d5
cp -pr examples $RPM_BUILD_ROOT/%{_datadir}/%{name}
cvsdist 548c7a8
Matt Wringe d2ea969
%if %{gcj_support}
Matt Wringe d2ea969
%{_bindir}/aot-compile-rpm
Matt Wringe d2ea969
%endif
Andrew Overholt 3c7417c
cvsdist 548c7a8
%clean
cvsdist 548c7a8
rm -rf $RPM_BUILD_ROOT
cvsdist 548c7a8
Andrew Overholt 3c7417c
%post
Matt Wringe d2ea969
%if %{gcj_support}
Matt Wringe d2ea969
if [ -x %{_bindir}/rebuild-gcj-db ]
Matt Wringe d2ea969
then
Matt Wringe d2ea969
  %{_bindir}/rebuild-gcj-db
Matt Wringe d2ea969
fi
Matt Wringe d2ea969
%endif
Andrew Overholt 3c7417c
Andrew Overholt 3c7417c
%postun
Matt Wringe d2ea969
%if %{gcj_support}
Matt Wringe d2ea969
if [ -x %{_bindir}/rebuild-gcj-db ]
Matt Wringe d2ea969
then
Matt Wringe d2ea969
  %{_bindir}/rebuild-gcj-db
Matt Wringe d2ea969
fi
Matt Wringe d2ea969
%endif
Andrew Overholt 3c7417c
cvsdist 548c7a8
%files
cvsdist 548c7a8
%defattr(0644,root,root,0755)
cvsdist 548c7a8
%{_javadir}/*.jar
cvsdist 548c7a8
%doc LICENSE README
Matt Wringe d2ea969
%defattr(0755,root,root,0755)
Matt Wringe d2ea969
/usr/bin/*
Matt Wringe d2ea969
Matt Wringe d2ea969
%if %{gcj_support}
Matt Wringe d2ea969
%attr(-,root,root) %{_libdir}/gcj/%{name}/javacc-4.0.jar.*
Matt Wringe d2ea969
%endif
cvsdist 548c7a8
cvsdist 548c7a8
%files manual
cvsdist 548c7a8
%defattr(0644,root,root,0755)
cvsdist 548c7a8
%doc doc/*
cvsdist 548c7a8
cvsdist 548c7a8
%files demo
cvsdist 548c7a8
%defattr(0644,root,root,0755)
Andrew Overholt 3c7417c
%{_datadir}/%{name}/*
cvsdist 548c7a8
cvsdist 548c7a8
%changelog
Matt Wringe 3f437df
* Thu Aug 10 2006 Matt Wringe <mwringe at redhat.com> - 0:4.0-3jpp.3
Matt Wringe 3f437df
- Rebuilt with new naming convention
Matt Wringe 3f437df
3e4b543
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:4.0-3jpp_2fc
3e4b543
- Rebuilt
3e4b543
Matt Wringe d2ea969
* Tue Jul 18 2006 Matthew Wringe <mwringe at redhat.com> - 0:4.0-3jpp_1fc
Matt Wringe d2ea969
- Merged with upstream version
Matt Wringe 14214d5
- Changed directory locations to rpm macros
Matt Wringe d2ea969
- Added conditional native compiling
Andrew Overholt e7931d9
Matt Wringe d2ea969
* Thu Apr 20 2006 Fernando Nasser <fnasser@redhat.com> - 0:4.0-2jpp
Matt Wringe d2ea969
- First JPP 1.7 build
gbenson a7d0434
Matt Wringe d2ea969
* Fri Mar 31 2006 Sebastiano Vigna <vigna at acm.org> - 0:4.0-1jpp
Matt Wringe d2ea969
- Updated to 4.0
Andrew Overholt 3c7417c
Matt Wringe d2ea969
* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:3.2-2jpp
Matt Wringe d2ea969
- Rebuild with ant-1.6.2
cvsdist 6b89241
Matt Wringe d2ea969
* Fri Jan 30 2004 Sebastiano Vigna <vigna at acm.org> 0:3.2-1jpp
cvsdist 548c7a8
- First JPackage version