diff --git a/README.md b/README.md index 9a00560..260c055 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,5 @@ 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. diff --git a/java-jflex-1.4.1-build_xml.patch b/java-jflex-1.4.1-build_xml.patch deleted file mode 100644 index b941382..0000000 --- a/java-jflex-1.4.1-build_xml.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- jflex-1.4.1/src/build.xml 2004-05-20 01:37:43.000000000 +0200 -+++ jflex-1.4.1/src/build.xml-gil 2009-03-02 15:24:58.000000000 +0100 -@@ -59,7 +59,14 @@ - description="compile all classes"> - -+ -+ -+ -+ - -@@ -93,6 +100,13 @@ - - - -+ -+ -+ -+ - - - diff --git a/java-jflex-1.4.1-byaccj.patch b/java-jflex-1.4.1-byaccj.patch deleted file mode 100644 index 8053ab0..0000000 --- a/java-jflex-1.4.1-byaccj.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- jflex-1.4.1/examples/byaccj/README 2003-01-07 16:30:17.000000000 +0100 -+++ jflex-1.4.1/examples/byaccj/README-gil 2009-03-02 18:31:10.000000000 +0100 -@@ -1,8 +1,7 @@ - This directory contains an interoperability example for BYacc/J and JFlex - (a small calculator) - --You need the parser generator byacc/j from --http://troi.lincom-asg.com/~rjamison/byacc/ -+You need the parser generator byacc/j from http://byaccj.sourceforge.net/ - for this example to work (version byacc/j 1.1 has been tested). - - Use the Makefile to generate the lexer and parser. diff --git a/java-jflex-1.4.1-classpath.patch b/java-jflex-1.4.1-classpath.patch deleted file mode 100644 index 3dcb950..0000000 --- a/java-jflex-1.4.1-classpath.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- jflex-1.4.1/src/build.xml 2009-03-02 18:43:48.000000000 +0100 -+++ jflex-1.4.1/src/build.xml-gil 2009-03-02 18:49:32.000000000 +0100 -@@ -7,10 +7,10 @@ - - - -- -+ - - -- -+ - - - -@@ -25,7 +25,6 @@ - - - -- - - - -@@ -38,12 +37,6 @@ - - - -- -- -- -- -- -- - - - diff --git a/java-jflex-1.4.1-cup-anttask.patch b/java-jflex-1.4.1-cup-anttask.patch deleted file mode 100644 index 621fc3e..0000000 --- a/java-jflex-1.4.1-cup-anttask.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- jflex-1.4.1/src/build.xml 2009-03-02 18:38:52.000000000 +0100 -+++ jflex-1.4.1/src/build.xml-gil 2009-03-02 18:42:35.000000000 +0100 -@@ -7,7 +7,7 @@ - - - -- -+ - - - -@@ -35,7 +35,7 @@ - - - -- -+ - - - -@@ -76,7 +76,7 @@ - - - -- -+ - - - diff --git a/java-jflex-1.4.1-no-cup-no-jflex.patch b/java-jflex-1.4.1-no-cup-no-jflex.patch deleted file mode 100644 index 11ddf89..0000000 --- a/java-jflex-1.4.1-no-cup-no-jflex.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- jflex-1.4.1/src/build.xml 2009-03-02 15:32:03.000000000 +0100 -+++ jflex-1.4.1/src/build.xml-gil 2009-03-02 15:37:29.000000000 +0100 -@@ -25,7 +25,6 @@ - - - -- - - - -@@ -38,12 +37,6 @@ - - - -- -- -- -- -- -- - - - -@@ -55,7 +48,7 @@ - - -- - - - -- -- -- -- -- -- -- -- - - - diff --git a/java-jflex.script b/java-jflex.script deleted file mode 100644 index 74ee0cd..0000000 --- a/java-jflex.script +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# -# jflex script -# JPackage Project - -# Source functions library -if [ -f /usr/share/java-utils/java-functions ] ; then - . /usr/share/java-utils/java-functions -else - echo "Can't find functions library, aborting" - exit 1 -fi - -# Configuration -MAIN_CLASS="JFlex.Main" -BASE_FLAGS="" -BASE_OPTIONS="" -BASE_JARS="jflex" - -# Set parameters -set_jvm -set_classpath $BASE_JARS -set_flags $BASE_FLAGS -set_options $BASE_OPTIONS - -# Let's start -run "$@" diff --git a/java-jflex.spec b/java-jflex.spec index 5109ea2..bc86cd3 100644 --- a/java-jflex.spec +++ b/java-jflex.spec @@ -1,100 +1,36 @@ -%define bootstrap 0 Name: java-jflex -Version: 1.4.1 -Release: 4mamba +Version: 1.8.2 +Release: 1mamba Summary: JFlex - The Fast Scanner Generator for Java Group: Development/Libraries/Java Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco -URL: http://jflex.de/ -Source0: http://jflex.de/jflex-%{version}.tar.gz -Source1: java-jflex.script -Patch0: java-jflex-1.4.1-build_xml.patch -Patch1: java-jflex-1.4.1-no-cup-no-jflex.patch -Patch2: java-jflex-1.4.1-cup-anttask.patch -Patch3: java-jflex-1.4.1-classpath.patch -Patch4: java-jflex-1.4.1-byaccj.patch +URL: https://www.jflex.de/ +Source0: https://github.com/jflex-de/jflex/releases/download/v%{version}/jflex-%{version}.tar.gz +Source1: jflex.sh License: GPL -BuildRequires: apache-ant -BuildRequires: java_cup -BuildRequires: java-junit3 -BuildRequires: jpackage-utils -BuildRequires: sinjdoc -Requires: java_cup -Requires: jpackage-utils -BuildRoot: %{_tmppath}/%{name}-%{version}-root +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END +BuildRequires: javapackages +Requires: javapackages %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 -Group: Documentation -Summary: Javadoc for %{name} - -%description javadoc -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. - -This package contains Javadoc for %{name}. - %prep -#rm -rf jflex* %setup -q -n jflex-%{version} -%patch0 -p1 -%if ! %bootstrap -%patch1 -p1 -%else -%patch2 -p1 -%patch3 -p1 -sed -i "s|_JAVA-DIR_|%{_javadir}|" src/build.xml -%patch4 -p1 - -%endif -rm -rf src/java_cup -#find . -name "*.class" -exec rm {} \; - -for j in $(find . -name "*.jar"); do - mv $j ${j}.no -done - -sed -i 's/\r//' COPYRIGHT %build -pushd src - %if ! %bootstrap - # bootstrap generated JFlex.jar - CLASSPATH=$(build-classpath java-cup java-cup-runtime junit-3.8.2) \ - ant jar-bootstrap - # rebuilding using the JFlex.jar - CLASSPATH=$(build-classpath java-cup java-cup-runtime junit-3.8.2):../lib/JFlex.jar \ - ant \ - genclean libclean \ - jar - - %else - CLASSPATH=$(build-classpath java-cup java_cup-runtime junit-3.8.2) \ - ant jar - %endif - mkdir -p ../dist/docs/api - sinjdoc -d ../dist/docs/api \ - -classpath $(build-classpath junit-3.8.2 ant-1.7.1):lib/JFlex.jar \ - -encoding iso-8859-1 \ - -sourcepath . JFlex \ - -doctitle 'JFlex %{version} API' \ - `find src -name '*.java'` -popd - %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}%{_javadir} -install -pm 644 lib/JFlex.jar \ +install -pm 644 lib/jflex-full-%{version}.jar \ %{buildroot}%{_javadir}/jflex-%{version}.jar ( cd %{buildroot}%{_javadir} @@ -104,19 +40,9 @@ install -pm 644 lib/JFlex.jar \ ln -s jflex.jar JFlex.jar ) -mkdir -p %{buildroot}%{_javadocdir}/jflex-%{version} - -cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/jflex-%{version} -ln -s jflex-%{version} %{buildroot}%{_javadocdir}/jflex - -mkdir -p %{buildroot}%{_bindir} -install -m 755 %{S:1} %{buildroot}%{_bindir}/jflex - -rm -rf doc/COPYRIGHT - -perl -pi -e 's/\r$//g' examples/standalone/sample.inp - -#%{_bindir}/aot-compile-rpm +install -m644 -D lib/jflex.vim \ + %{buildroot}%{_datadir}/vim/syntax/jflex.vim +install -m755 -D %{SOURCE1} %{buildroot}%{_bindir}/jflex %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -127,15 +53,13 @@ perl -pi -e 's/\r$//g' examples/standalone/sample.inp %{_javadir}/jflex-%{version}.jar %{_javadir}/jflex.jar %{_javadir}/JFlex.jar -%doc COPYRIGHT doc/* -%doc examples src/README src/changelog - -%files javadoc -%defattr(-,root,root) -%{_javadocdir}/jflex-%{version} -%{_javadocdir}/jflex +%{_datadir}/vim/syntax/jflex.vim +%doc doc/COPYRIGHT %changelog +* Sat Aug 13 2022 Silvan Calarco 1.8.2-1mamba +- update to 1.8.2 + * Thu Nov 25 2010 gil 1.4.1-4mamba - rebuilt devel diff --git a/jflex.sh b/jflex.sh new file mode 100644 index 0000000..611f1c1 --- /dev/null +++ b/jflex.sh @@ -0,0 +1,3 @@ +#!/usr/bin/sh + +java -jar /usr/share/java/jflex.jar "$@"