|
|
|
@ -1,10 +1,7 @@
|
|
|
|
|
%bcond_without desktop
|
|
|
|
|
%bcond_without emacs
|
|
|
|
|
|
|
|
|
|
Summary: Fast Scanner Generator
|
|
|
|
|
Name: jflex
|
|
|
|
|
Version: 1.6.1
|
|
|
|
|
Release: 12%{?dist}
|
|
|
|
|
Version: 1.7.0
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: http://jflex.de/
|
|
|
|
|
BuildArch: noarch
|
|
|
|
@ -23,13 +20,6 @@ BuildRequires: junit
|
|
|
|
|
BuildRequires: sonatype-oss-parent
|
|
|
|
|
BuildRequires: java-devel
|
|
|
|
|
BuildRequires: java_cup
|
|
|
|
|
%if %{with desktop}
|
|
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with emacs}
|
|
|
|
|
BuildRequires: emacs
|
|
|
|
|
Requires: emacs-filesystem >= %{_emacs_version}
|
|
|
|
|
%endif
|
|
|
|
|
# Explicit javapackages-tools requires since scripts use
|
|
|
|
|
# /usr/share/java-utils/java-functions
|
|
|
|
|
Requires: javapackages-tools
|
|
|
|
@ -56,22 +46,32 @@ This package provides %{summary}.
|
|
|
|
|
%mvn_file : %{name}
|
|
|
|
|
%pom_add_dep java_cup:java_cup
|
|
|
|
|
|
|
|
|
|
%pom_remove_plugin :maven-antrun-plugin
|
|
|
|
|
%pom_remove_plugin :jflex-maven-plugin
|
|
|
|
|
%pom_remove_plugin :cup-maven-plugin
|
|
|
|
|
%pom_remove_plugin :maven-shade-plugin
|
|
|
|
|
%pom_remove_dep :cup_runtime
|
|
|
|
|
|
|
|
|
|
# Tests fail with 320k stacks (default on i686), so lets increase
|
|
|
|
|
# stack to 16M to avoid stack overflows. See rhbz#1119308
|
|
|
|
|
%pom_xpath_inject "pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:configuration" "<argLine>-Xss16384k</argLine>"
|
|
|
|
|
|
|
|
|
|
%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:dependency[pom:artifactId='plexus-compiler-javac-errorprone']" parent.xml
|
|
|
|
|
%pom_xpath_remove "pom:dependency[pom:artifactId='error_prone_core']" parent.xml
|
|
|
|
|
%pom_xpath_remove "pom:compilerId" parent.xml
|
|
|
|
|
%pom_xpath_remove "pom:compilerArgs" parent.xml
|
|
|
|
|
|
|
|
|
|
sed -i /%%inputstreamctor/d src/main/jflex/LexScan.flex
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
java -jar $(find-jar 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
|
|
|
|
|
|
|
|
|
|
%if %{with emacs}
|
|
|
|
|
# Compile Emacs jflex-mode source
|
|
|
|
|
%{_emacs_bytecompile} lib/jflex-mode.el
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%mvn_install
|
|
|
|
@ -84,31 +84,14 @@ install -d -m 755 %{buildroot}%{_mandir}/man1
|
|
|
|
|
install -p -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1
|
|
|
|
|
|
|
|
|
|
# .desktop + icons
|
|
|
|
|
%if %{with desktop}
|
|
|
|
|
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}
|
|
|
|
|
install -d -m 755 %{buildroot}%{_datadir}/pixmaps
|
|
|
|
|
install -p -m 644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Emacs files
|
|
|
|
|
%if %{with emacs}
|
|
|
|
|
install -d -m 755 %{buildroot}%{_emacs_sitelispdir}/%{name}
|
|
|
|
|
install -p -m 644 lib/jflex-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name}
|
|
|
|
|
install -p -m 644 lib/jflex-mode.elc %{buildroot}%{_emacs_sitelispdir}/%{name}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
|
%doc doc
|
|
|
|
|
%doc COPYRIGHT
|
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
|
%{_mandir}/man1/%{name}.1.gz
|
|
|
|
|
%if %{with desktop}
|
|
|
|
|
%{_datadir}/applications/%{name}.desktop
|
|
|
|
|
%{_datadir}/pixmaps/%{name}.png
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with emacs}
|
|
|
|
|
%{_emacs_sitelispdir}/%{name}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
|
%doc COPYRIGHT
|
|
|
|
@ -116,6 +99,15 @@ install -p -m 644 lib/jflex-mode.elc %{buildroot}%{_emacs_sitelispdir}/%{name}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7.0-2
|
|
|
|
|
- Mass rebuild for javapackages-tools 201902
|
|
|
|
|
|
|
|
|
|
* Thu Jun 06 2019 Marian Koncek <mkoncek@redhat.com> - 1.7.0-1
|
|
|
|
|
- Update to upstream version 1.7.0
|
|
|
|
|
|
|
|
|
|
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.6.1-13
|
|
|
|
|
- Mass rebuild for javapackages-tools 201901
|
|
|
|
|
|
|
|
|
|
* Tue Jul 31 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1.6.1-12
|
|
|
|
|
- Add requirement on javapackages-tools for scripts using
|
|
|
|
|
java-functions.
|
|
|
|
|