Accepting request 1208837 from Java:packages
- Upgrade to 1.9.1 - Simplify multibuild OBS-URL: https://build.opensuse.org/request/show/1208837 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jflex?expand=0&rev=27
This commit is contained in:
commit
78058dd865
@ -1,4 +1,3 @@
|
||||
<multibuild>
|
||||
<package>jflex-bootstrap</package>
|
||||
<package>bootstrap</package>
|
||||
</multibuild>
|
||||
|
||||
|
15
_service
Normal file
15
_service
Normal file
@ -0,0 +1,15 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="scm">git</param>
|
||||
<param name="url">https://github.com/jflex-de/jflex.git</param>
|
||||
<param name="revision">v1.9.1</param>
|
||||
<param name="match-tag">v*</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled"/>
|
||||
</services>
|
BIN
jflex-1.8.2-generated-files.tar.xz
(Stored with Git LFS)
BIN
jflex-1.8.2-generated-files.tar.xz
(Stored with Git LFS)
Binary file not shown.
@ -1,19 +0,0 @@
|
||||
--- jflex/src/main/java/jflex/base/IntPair.java
|
||||
+++ jflex/src/main/java/jflex/base/IntPair.java
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
package jflex.base;
|
||||
|
||||
-import com.google.auto.value.AutoValue;
|
||||
-
|
||||
/**
|
||||
* Simple pair of integers.
|
||||
*
|
||||
@@ -19,7 +17,6 @@ import com.google.auto.value.AutoValue;
|
||||
* @author Gerwin Klein
|
||||
* @version JFlex 1.8.2
|
||||
*/
|
||||
-@AutoValue
|
||||
public abstract class IntPair {
|
||||
|
||||
public abstract int start();
|
BIN
jflex-1.8.2.tar.gz
(Stored with Git LFS)
BIN
jflex-1.8.2.tar.gz
(Stored with Git LFS)
Binary file not shown.
BIN
jflex-1.9.1-generated-files.tar.xz
(Stored with Git LFS)
Normal file
BIN
jflex-1.9.1-generated-files.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
20
jflex-1.9.1-no-auto-value.patch
Normal file
20
jflex-1.9.1-no-auto-value.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff -urEbwB jflex-1.9.1.orig/src/main/java/jflex/base/IntPair.java jflex-1.9.1/src/main/java/jflex/base/IntPair.java
|
||||
--- jflex-1.9.1.orig/jflex/src/main/java/jflex/base/IntPair.java 2024-10-15 11:01:17.724854292 +0200
|
||||
+++ jflex-1.9.1/jflex/src/main/java/jflex/base/IntPair.java 2024-10-15 11:02:56.115127297 +0200
|
||||
@@ -5,8 +5,6 @@
|
||||
|
||||
package jflex.base;
|
||||
|
||||
-import com.google.auto.value.AutoValue;
|
||||
-
|
||||
/**
|
||||
* Simple pair of integers.
|
||||
*
|
||||
@@ -15,7 +13,6 @@
|
||||
* @author Gerwin Klein
|
||||
* @version JFlex 1.9.1
|
||||
*/
|
||||
-@AutoValue
|
||||
public abstract class IntPair {
|
||||
|
||||
public abstract int start();
|
BIN
jflex-1.9.1.tar.xz
(Stored with Git LFS)
Normal file
BIN
jflex-1.9.1.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,115 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 21 22:06:45 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Use %patch -P N instead of deprecated %patchN.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 25 18:27:04 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Build with source and target levels 8
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 4 13:37:10 UTC 2023 - Frederic Crozat <fcrozat@suse.com>
|
||||
|
||||
- Add _multibuild to define additional spec files as additional
|
||||
flavors.
|
||||
Eliminates the need for source package links in OBS.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 30 10:16:51 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Build against the standalone JavaEE modules unconditionally
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 17 15:42:32 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Build against standalone glassfish-annotation-api for relevant
|
||||
distribution versions that have JDK that does not contain the
|
||||
JavaEE modules
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 14 07:05:37 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Upgrade to version 1.8.2
|
||||
* fix build with recent java-cup
|
||||
- Build the bootstrap package using ant with a generated build.xml
|
||||
- Build the non-bootstrap package using maven, since its dependency
|
||||
auto is already built with maven
|
||||
- Added patch:
|
||||
* jflex-1.8.2-no-auto-value.patch
|
||||
+ do not process auto-value-annotations in bootstrap build
|
||||
+ the generated file is pre-generated outside build for this
|
||||
variant
|
||||
- Removed patches:
|
||||
* jflex-byaccj-utl.patch
|
||||
* jflex-classpath.patch
|
||||
* jflex-javac-no-target.patch
|
||||
* jflex-junit4.patch
|
||||
* jflex-no-cup-no-jflex.patch
|
||||
+ not needed in this version
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 4 07:49:17 UTC 2017 - fstrba@suse.com
|
||||
|
||||
- Removed a jflex-lex-scan.patch again, so that bot is happy
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 3 17:31:18 UTC 2017 - fstrba@suse.com
|
||||
|
||||
- Don't BuildRequire java-1_5_0-gcj-compat-devel, since it will be
|
||||
soon gone; BuildRequire java-devel
|
||||
- Build with java source and target level 1.6 to allow building
|
||||
with jdk9
|
||||
- Sync the bootstrap and non-bootstrap spec files using the
|
||||
jpackage-bootstrap-prepare.sh script and clean spec file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 2 12:44:19 UTC 2013 - mvyskocil@suse.com
|
||||
|
||||
- conflict the non-bootstrap variant with the bootstrap variant
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 14 12:31:24 UTC 2013 - mvyskocil@suse.com
|
||||
|
||||
- Fix build with junit 4
|
||||
* jflex-junit4.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 9 11:06:00 UTC 2013 - tchvatal@suse.com
|
||||
|
||||
- Move from jpackage-utils to javapackage-tools
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 26 12:18:15 UTC 2013 - mvyskocil@suse.com
|
||||
|
||||
- don't build tests when bootstrapping
|
||||
- properly synchronized both spec files
|
||||
- drop antlr-bootstrap dependency, it's pointless withouth javadoc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 23 09:06:21 UTC 2013 - mvyskocil@suse.com
|
||||
|
||||
- don't build javadoc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 17 00:59:58 CET 2011 - mvyskocil@suse.cz
|
||||
|
||||
- fix build with antlr-bootstrap
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 21 17:11:33 CEST 2009 - mvyskocil@suse.cz
|
||||
|
||||
- Removed a jflex-lex-scan.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 5 09:35:07 CEST 2009 - mvyskocil@suse.cz
|
||||
|
||||
- Update to 1.4.3 (bugfix release)
|
||||
- Build using java-1_5_0-gcj to allow openjdk bootstrap
|
||||
- Recreated jflex-lex-scan.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 29 16:16:14 CEST 2009 - mvyskocil@suse.cz
|
||||
|
||||
- Initial packaging of jflex-bootstrap 1.4.2 in SUSE (from jpp5)
|
||||
|
@ -1,149 +0,0 @@
|
||||
#
|
||||
# spec file for package jflex-bootstrap
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# 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 https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
##### WARNING: please do not edit this auto generated spec file. Use the jflex.spec! #####
|
||||
%global with_bootstrap 1
|
||||
%bcond_with bootstrap
|
||||
Name: jflex-bootstrap
|
||||
Version: 1.8.2
|
||||
Release: 0
|
||||
Summary: Lexical Analyzer Generator for Java
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/Java
|
||||
URL: https://www.jflex.de/
|
||||
Source0: http://www.jflex.de/release/jflex-%{version}.tar.gz
|
||||
Source1: jflex-%{version}-generated-files.tar.xz
|
||||
Source2: jflex-build.xml
|
||||
Patch0: jflex-1.8.2-no-auto-value.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: glassfish-annotation-api
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: javapackages-local
|
||||
Requires: java_cup
|
||||
Requires: javapackages-tools
|
||||
BuildArch: noarch
|
||||
%if %{without bootstrap}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-cup
|
||||
BuildRequires: jflex-bootstrap
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: mvn(com.google.auto.value:auto-value)
|
||||
BuildRequires: mvn(com.google.auto.value:auto-value-annotations)
|
||||
Conflicts: jflex-bootstrap
|
||||
%else
|
||||
BuildRequires: java-cup-bootstrap
|
||||
Conflicts: jflex
|
||||
%endif
|
||||
|
||||
%description
|
||||
JFlex is a lexical analyzer generator for Java written in Java. 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.
|
||||
|
||||
Design goals The main design goals of JFlex are:
|
||||
|
||||
* Full unicode support
|
||||
* Fast generated scanners
|
||||
* Fast scanner generation
|
||||
* Convenient specification syntax
|
||||
* Platform independence
|
||||
* JLex compatibility
|
||||
|
||||
%if %without bootstrap
|
||||
%package javadoc
|
||||
Summary: API documentation for %{name}
|
||||
Provides: %{name}-doc = %{version}-%{release}
|
||||
Obsoletes: %{name}-doc < %{version}-%{release}
|
||||
|
||||
%description javadoc
|
||||
This package provides %{summary}.
|
||||
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n jflex-%{version}
|
||||
find . -name '*.jar' -print -delete
|
||||
find . -name '.gitignore' -print -delete
|
||||
rm -rf src/generated
|
||||
%pom_remove_plugin :jflex-maven-plugin
|
||||
%pom_remove_plugin :cup-maven-plugin
|
||||
%pom_remove_plugin :maven-shade-plugin
|
||||
%pom_remove_plugin :jacoco-maven-plugin
|
||||
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId='maven-site-plugin']" parent.xml
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId='fmt-maven-plugin']" parent.xml
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId='cup-maven-plugin']" parent.xml
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId='maven-shade-plugin']" parent.xml
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId='jacoco-maven-plugin']" parent.xml
|
||||
|
||||
%pom_xpath_set pom:project/pom:properties/pom:jflex.jdk.version 1.8 parent.xml
|
||||
|
||||
%if %{with bootstrap}
|
||||
%setup -q -T -D -a 1 -n jflex-%{version}
|
||||
cp %{SOURCE2} build.xml
|
||||
mkdir -p lib
|
||||
%patch -P 0 -p1
|
||||
build-jar-repository -s lib java-cup-runtime glassfish-annotation-api
|
||||
%else
|
||||
%{mvn_file} : %{name} JFlex
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if %{with bootstrap}
|
||||
%{ant} package
|
||||
%else
|
||||
java-cup -parser LexParse -interface -destdir src/main/java src/main/cup/LexParse.cup
|
||||
jflex -d src/main/java/jflex --skel src/main/jflex/skeleton.nested src/main/jflex/LexScan.flex
|
||||
%{mvn_build} -f
|
||||
%endif
|
||||
|
||||
%install
|
||||
|
||||
%if %{with bootstrap}
|
||||
# jar
|
||||
mkdir -p %{buildroot}%{_javadir}
|
||||
cp -a target/jflex-%{version}.jar %{buildroot}%{_javadir}/jflex.jar
|
||||
|
||||
# compatibility symlink
|
||||
(cd %{buildroot}%{_javadir} && ln -s jflex.jar JFlex.jar)
|
||||
%else
|
||||
%mvn_install
|
||||
%fdupes -s %{buildroot}/%{_javadocdir}/%{name}
|
||||
%endif
|
||||
|
||||
%jpackage_script jflex.Main "" "" jflex:java-cup jflex true
|
||||
|
||||
%if %{with bootstrap}
|
||||
%files
|
||||
%{_javadir}/jflex.jar
|
||||
%{_javadir}/JFlex.jar
|
||||
%else
|
||||
|
||||
%files -f .mfiles
|
||||
%endif
|
||||
%license src/main/resources/LICENSE_JFLEX
|
||||
%doc README.md changelog.md
|
||||
%attr(0755,root,root) %{_bindir}/jflex
|
||||
|
||||
%if %without bootstrap
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license src/main/resources/LICENSE_JFLEX
|
||||
%endif
|
||||
|
||||
%changelog
|
@ -9,7 +9,7 @@
|
||||
<property file="build.properties"/>
|
||||
|
||||
<property name="project.artifactId" value="jflex"/>
|
||||
<property name="project.version" value="1.8.2"/>
|
||||
<property name="project.version" value="[UNKNOWN]"/>
|
||||
|
||||
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
||||
<property name="build.dir" value="target"/>
|
||||
@ -25,7 +25,7 @@
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<path id="build.classpath">
|
||||
<fileset dir="lib">
|
||||
<fileset dir="../lib">
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
@ -1,3 +1,49 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 15 11:15:12 UTC 2024 - Gus Kenion <gus.kenion@suse.com>
|
||||
|
||||
- Upgrade to 1.9.1
|
||||
* JFlex 1.9.1 is a small bugfix release:
|
||||
* fix negated char classes with overlapping content
|
||||
(#1065, #1066): Expressions such as [^\s\n] were translated
|
||||
incorrectly, because \s and \n overlap and the negation
|
||||
operator ^ in version 1.9.0 did not handle this case correctly.
|
||||
- Includes changes from 1.9.0
|
||||
* JFlex 1.9.0 is a feature release with slight performance
|
||||
improvements in the scanning engine. It also fixes all known
|
||||
bugs of version 1.8.2.
|
||||
* New features
|
||||
+ add optional token limit size (#1045, #197)
|
||||
+ warn for unicode escapes that are too long (#1042)
|
||||
+ directives and command line switches for enabling/disabling
|
||||
JFlex warnings (#1020)
|
||||
+ allow custom annotations such as @SuppressWarnings
|
||||
(#1027, #762)
|
||||
+ increase maximum supported DFA size to about 2^32 states
|
||||
(#1003, #952)
|
||||
+ better error reporting for character classes (#996, #888, #939)
|
||||
+ allow comments after %yylexthrow (#794)
|
||||
+ make maven build reproducible (#765)
|
||||
* Fixed bugs
|
||||
+ make character classes more robust (#985, #974, #986)
|
||||
+ fix NullPointerException when generating dot files (#769)
|
||||
* Other
|
||||
+ update dependencies
|
||||
+ more and better property-based tests (#953)
|
||||
+ use SPDX license identifiers
|
||||
+ avoid use of createTempDir() (was used in tests only)
|
||||
+ migrate CI to GitHub actions
|
||||
+ migrate most tests to bazel
|
||||
+ improve test suite to work on non-US locales
|
||||
+ fix example file name for minijava example
|
||||
+ improved simple.flex example
|
||||
- Remove jflex-1.8.2-no-auto-value.patch (not applicable to
|
||||
versions newer than 1.8.2)
|
||||
- Add jflex-1.9.1-no-auto-value.patch
|
||||
- Merge multibuild logic into single .spec file
|
||||
* remove jflex-bootstrap.spec
|
||||
* remove jflex-bootstrap.changes
|
||||
* remove pre-checkin.sh
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 21 22:06:45 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
86
jflex.spec
86
jflex.spec
@ -16,23 +16,32 @@
|
||||
#
|
||||
|
||||
|
||||
%global _without_bootstrap 1
|
||||
%bcond_with bootstrap
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "bootstrap"
|
||||
%bcond_without bootstrap
|
||||
%else
|
||||
%bcond_with bootstrap
|
||||
%endif
|
||||
%if %{with bootstrap}
|
||||
Name: jflex-bootstrap
|
||||
%else
|
||||
Name: jflex
|
||||
Version: 1.8.2
|
||||
%endif
|
||||
Version: 1.9.1
|
||||
Release: 0
|
||||
Summary: Lexical Analyzer Generator for Java
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/Java
|
||||
URL: https://www.jflex.de/
|
||||
Source0: http://www.jflex.de/release/jflex-%{version}.tar.gz
|
||||
Source0: jflex-%{version}.tar.xz
|
||||
Source1: jflex-%{version}-generated-files.tar.xz
|
||||
Source2: jflex-build.xml
|
||||
Patch0: jflex-1.8.2-no-auto-value.patch
|
||||
Patch0: jflex-1.9.1-no-auto-value.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: glassfish-annotation-api
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: jsr-305
|
||||
Requires: java_cup
|
||||
Requires: javapackages-tools
|
||||
BuildArch: noarch
|
||||
@ -43,6 +52,11 @@ BuildRequires: jflex-bootstrap
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: mvn(com.google.auto.value:auto-value)
|
||||
BuildRequires: mvn(com.google.auto.value:auto-value-annotations)
|
||||
BuildRequires: mvn(com.google.guava:guava)
|
||||
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
|
||||
BuildRequires: mvn(org.apache.maven:maven-core)
|
||||
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
|
||||
Conflicts: jflex-bootstrap
|
||||
%else
|
||||
BuildRequires: java-cup-bootstrap
|
||||
@ -65,6 +79,19 @@ Design goals The main design goals of JFlex are:
|
||||
* JLex compatibility
|
||||
|
||||
%if %without bootstrap
|
||||
%package maven-plugin
|
||||
Summary: JFlex Maven Plugin
|
||||
|
||||
%description maven-plugin
|
||||
This is a Maven 3 plugin to generate Lexer code in Java from
|
||||
a Lexer specification, using JFlex.
|
||||
|
||||
%package -n cup-maven-plugin
|
||||
Summary: CUP Maven plugin
|
||||
|
||||
%description -n cup-maven-plugin
|
||||
A plugin to generate Java parsers with CUP.
|
||||
|
||||
%package javadoc
|
||||
Summary: API documentation for %{name}
|
||||
Provides: %{name}-doc = %{version}-%{release}
|
||||
@ -80,36 +107,36 @@ This package provides %{summary}.
|
||||
find . -name '*.jar' -print -delete
|
||||
find . -name '.gitignore' -print -delete
|
||||
rm -rf src/generated
|
||||
%pom_remove_plugin :jflex-maven-plugin
|
||||
%pom_remove_plugin :cup-maven-plugin
|
||||
%pom_remove_plugin :maven-shade-plugin
|
||||
%pom_remove_plugin :jacoco-maven-plugin
|
||||
%pom_remove_plugin :jflex-maven-plugin jflex
|
||||
%pom_remove_plugin -r :cup-maven-plugin
|
||||
%pom_remove_plugin -r :maven-shade-plugin
|
||||
%pom_remove_plugin -r :maven-site-plugin
|
||||
%pom_remove_plugin -r :fmt-maven-plugin
|
||||
%pom_remove_plugin -r :maven-enforcer-plugin
|
||||
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId='maven-site-plugin']" parent.xml
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId='fmt-maven-plugin']" parent.xml
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId='cup-maven-plugin']" parent.xml
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId='maven-shade-plugin']" parent.xml
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId='jacoco-maven-plugin']" parent.xml
|
||||
%pom_xpath_set pom:project/pom:properties/pom:jflex.jdk.version 1.8
|
||||
|
||||
%pom_xpath_set pom:project/pom:properties/pom:jflex.jdk.version 1.8 parent.xml
|
||||
%pom_disable_module benchmark
|
||||
%pom_disable_module testsuite
|
||||
|
||||
%if %{with bootstrap}
|
||||
%setup -q -T -D -a 1 -n jflex-%{version}
|
||||
cp %{SOURCE2} build.xml
|
||||
cp %{SOURCE2} jflex/build.xml
|
||||
mkdir -p lib
|
||||
%patch -P 0 -p1
|
||||
build-jar-repository -s lib java-cup-runtime glassfish-annotation-api
|
||||
build-jar-repository -s lib jsr-305 java-cup-runtime glassfish-annotation-api
|
||||
%else
|
||||
%{mvn_file} : %{name} JFlex
|
||||
%{mvn_file} :jflex %{name} JFlex
|
||||
%{mvn_package} :jflex-parent __noinstall
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if %{with bootstrap}
|
||||
%{ant} package
|
||||
ant -Dproject.version=%{version} -f jflex/build.xml package
|
||||
%else
|
||||
java-cup -parser LexParse -interface -destdir src/main/java src/main/cup/LexParse.cup
|
||||
jflex -d src/main/java/jflex --skel src/main/jflex/skeleton.nested src/main/jflex/LexScan.flex
|
||||
%{mvn_build} -f
|
||||
java-cup -parser LexParse -interface -destdir jflex/src/main/java jflex/src/main/cup/LexParse.cup
|
||||
jflex -d jflex/src/main/java/jflex --skel jflex/src/main/jflex/skeleton.nested jflex/src/main/jflex/LexScan.flex
|
||||
%{mvn_build} -fs
|
||||
%endif
|
||||
|
||||
%install
|
||||
@ -117,7 +144,7 @@ jflex -d src/main/java/jflex --skel src/main/jflex/skeleton.nested src/main/jfle
|
||||
%if %{with bootstrap}
|
||||
# jar
|
||||
mkdir -p %{buildroot}%{_javadir}
|
||||
cp -a target/jflex-%{version}.jar %{buildroot}%{_javadir}/jflex.jar
|
||||
cp -a jflex/target/jflex-%{version}.jar %{buildroot}%{_javadir}/jflex.jar
|
||||
|
||||
# compatibility symlink
|
||||
(cd %{buildroot}%{_javadir} && ln -s jflex.jar JFlex.jar)
|
||||
@ -134,15 +161,20 @@ cp -a target/jflex-%{version}.jar %{buildroot}%{_javadir}/jflex.jar
|
||||
%{_javadir}/JFlex.jar
|
||||
%else
|
||||
|
||||
%files -f .mfiles
|
||||
%files -f .mfiles-jflex
|
||||
%endif
|
||||
%license src/main/resources/LICENSE_JFLEX
|
||||
%doc README.md changelog.md
|
||||
%license LICENSE.md
|
||||
%doc README.md
|
||||
%attr(0755,root,root) %{_bindir}/jflex
|
||||
|
||||
%if %without bootstrap
|
||||
%files maven-plugin -f .mfiles-jflex-maven-plugin
|
||||
%doc jflex-maven-plugin/README.md
|
||||
|
||||
%files -n cup-maven-plugin -f .mfiles-cup-maven-plugin
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license src/main/resources/LICENSE_JFLEX
|
||||
%license LICENSE.md
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
NAME1=jflex
|
||||
NAME2=jflex-bootstrap
|
||||
COPY_CHANGES=true
|
||||
|
||||
EDIT_WARNING="##### WARNING: please do not edit this auto generated spec file. Use the ${NAME1}.spec! #####\n"
|
||||
sed "s/^%global _without_bootstrap.*$/${EDIT_WARNING}%global with_bootstrap 1/;
|
||||
s/^\(Name:.*\)$/\1-bootstrap/;
|
||||
" < ${NAME1}.spec > ${NAME2:-${NAME1}-bootstrap}.spec
|
||||
|
||||
if ${COPY_CHANGES}; then
|
||||
cp ${NAME1}.changes ${NAME2:-${NAME1}-bootstrap}.changes
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user