diff --git a/.cvsignore b/.cvsignore index e69de29..1e7a134 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +jflex-1.3.5.tar.gz diff --git a/jflex-Makefile.patch b/jflex-Makefile.patch new file mode 100644 index 0000000..4236dbe --- /dev/null +++ b/jflex-Makefile.patch @@ -0,0 +1,33 @@ +--- src/Makefile.sav 2001-10-08 05:57:06.000000000 -0400 ++++ src/Makefile 2007-02-13 10:50:00.000000000 -0500 +@@ -3,14 +3,16 @@ + JFLEX = jflex -skel skeleton.nested + CUP = java java_cup.Main + +-JAVAC = javac -target 1.1 -bootclasspath /usr/lib/jdk1.1/lib/classes.zip ++JAVAC = javac -target 1.4 -bootclasspath /usr/lib/jvm/java/jre/lib/rt.jar + #JAVAC = jikes + JAR = jar + ++JAVADOC = javadoc ++ + DEST = ../lib + + # jdk 1.2 +-CLPATH = -classpath /usr/lib/java/jre/lib/rt.jar:. ++CLPATH = -classpath /usr/lib/jvm/java/jre/lib/rt.jar:. + + # jdk 1.1 + #CLPATH = -classpath /usr/lib/java/lib/classes.zip:. +@@ -58,6 +60,10 @@ + + jar: jarclean + echo "Main-Class: JFlex.Main" > $(DEST)/manifest +- cd $(DEST); $(JAR) -c0mf manifest $(JARFILE) JFlex java_cup ++ cd $(DEST); $(JAR) -cmf manifest $(JARFILE) JFlex java_cup + rm -rf $(DEST)/java_cup $(DEST)/JFlex $(DEST)/manifest + ++javadoc: ++ $(JAVADOC) -sourcepath . -d ../api JFlex ++ ++ diff --git a/jflex.spec b/jflex.spec new file mode 100644 index 0000000..ce4a3af --- /dev/null +++ b/jflex.spec @@ -0,0 +1,128 @@ +# Copyright (c) 2000-2005, JPackage Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the +# distribution. +# 3. Neither the name of the JPackage Project nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +%define section free + +Summary: Fast Scanner Generator +Name: jflex +Version: 1.3.5 +Release: 2jpp.1%{?dist} +Epoch: 0 +License: GPL +URL: http://jflex.de/ +Group: Development/Libraries/Java +Source0: http://downloads.sourceforge.net/jflex/jflex-1.3.5.tar.gz +Patch0: jflex-Makefile.patch +BuildRequires: jpackage-utils >= 0:1.5 +BuildRequires: make +BuildRequires: java-devel +Requires: java +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +JFlex is a lexical analyzer generator (also known as scanner +generator) for Java(tm), written in Java(tm). It is also a +rewrite of the very useful tool JLex which was developed by +Elliot Berk at Princeton University. As Vern Paxson states +for his C/C++ tool flex: They do not share any code though. +JFlex is designed to work together with the LALR parser +generator CUP by Scott Hudson, and the Java modification of +Berkeley Yacc BYacc/J by Bob Jamison. It can also be used +together with other parser generators like ANTLR or as a +standalone tool. + +%package javadoc +Summary: Javadoc for %{name} +Group: Development/Documentation + +%description javadoc +%{summary}. + +%prep +%setup -q -n JFlex +for j in $(find . -name "*.jar"); do mv $j $j.no; done +find . -name "*.class" -exec rm {} \; + +%{__sed} -i 's/\r//' COPYRIGHT +%patch0 -b .sav + +%build + +pushd src +make all javadoc +popd + +%install +rm -rf $RPM_BUILD_ROOT + +# jars +mkdir -p $RPM_BUILD_ROOT%{_javadir} +cp -p lib/JFlex.jar \ + $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar +(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; \ + do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) + +# javadoc +mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +cp -pr api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} + +# docs +mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} +cp -p doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} +cp -p COPYRIGHT $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(0644,root,root,0755) +%doc %{_docdir}/%{name}-%{version} +%{_javadir}/*.jar + +%files javadoc +%defattr(0644,root,root,0755) +%doc %{_javadocdir}/%{name}-%{version} +%doc %{_javadocdir}/%{name} + +# ----------------------------------------------------------------------------- + +%changelog +* Mon Feb 12 2007 Matt Wringe - 0:1.3.5-2jpp.1 +- Remove javadoc post and postun sections due to new jpp standard +- Update makefile patch to compress jar +- Fix rpmlint issues + +* Wed Jan 04 2006 Fernando Nasser - 0:1.3.5-2jpp +- First JPP 1.7 build + +* Wed Nov 16 2005 Ralph Apel - 0:1.3.5-1jpp +- First JPackage release diff --git a/sources b/sources index e69de29..d707163 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c77a9656aa20979f2268d7443995700f jflex-1.3.5.tar.gz