Bootstrap Maven as non-modular packages
Resolves: rhbz#1951482
This commit is contained in:
parent
7a864d28d2
commit
f0805a6e24
@ -1,9 +1,14 @@
|
||||
# Workaround for rhbz#1969370: __bootstrap macro is not defined in
|
||||
# CentOS Stream, See https://bugzilla.redhat.com/1969370
|
||||
%global __bootstrap ~bootstrap
|
||||
|
||||
%bcond_without bootstrap
|
||||
|
||||
%global pkg_version 11b
|
||||
%global with_bootstrap 0
|
||||
|
||||
Name: java_cup
|
||||
Version: 0.11b
|
||||
Release: 17%{?dist}
|
||||
Release: 18%{?dist}
|
||||
Epoch: 1
|
||||
Summary: LALR parser generator for Java
|
||||
License: MIT
|
||||
@ -19,13 +24,19 @@ Source4: %{name}-runtime-MANIFEST.MF
|
||||
|
||||
Patch0: %{name}-build.patch
|
||||
|
||||
BuildRequires: ant
|
||||
BuildRequires: javapackages-local
|
||||
%if %{with bootstrap}
|
||||
BuildRequires: javapackages-bootstrap
|
||||
%else
|
||||
BuildRequires: ant
|
||||
BuildRequires: jflex
|
||||
%if ! %{with_bootstrap}
|
||||
BuildRequires: java_cup >= 1:0.11a
|
||||
BuildRequires: java_cup
|
||||
%endif
|
||||
|
||||
# Explicit javapackages-tools requires since scripts use
|
||||
# /usr/share/java-utils/java-functions
|
||||
Requires: javapackages-tools
|
||||
|
||||
|
||||
%description
|
||||
java_cup is a LALR Parser Generator for Java
|
||||
@ -46,31 +57,25 @@ Documentation for java_cup.
|
||||
%setup -q
|
||||
%patch0 -b .build
|
||||
|
||||
sed -i '/<javac/s/1.5/1.6/g' build.xml
|
||||
|
||||
# remove all binary files
|
||||
find -name "*.class" -delete
|
||||
|
||||
%mvn_file ':{*}' @1
|
||||
|
||||
%if ! %{with_bootstrap}
|
||||
# remove prebuilt JFlex
|
||||
rm -rf java_cup-%{version}/bin/JFlex.jar
|
||||
|
||||
# remove prebuilt java_cup, if not bootstrapping
|
||||
rm -rf java_cup-%{version}/bin/java-cup-11.jar
|
||||
%endif
|
||||
|
||||
# Use source/target 1.6 for Java 11
|
||||
sed -i 's/source="1.5"/source="1.6"/' build.xml
|
||||
sed -i 's/target="1.5"/target="1.6"/' build.xml
|
||||
|
||||
%build
|
||||
%if ! %{with_bootstrap}
|
||||
export CLASSPATH=$(build-classpath java_cup java_cup-runtime jflex)
|
||||
%endif
|
||||
|
||||
ant -Dcupversion=20150326 -Dsvnversion=65
|
||||
%ant -Dcupversion=20150326 -Dsvnversion=65
|
||||
find -name parser.cup -delete
|
||||
ant javadoc
|
||||
%ant javadoc
|
||||
|
||||
# inject OSGi manifests
|
||||
jar ufm dist/java-cup-%{pkg_version}.jar %{SOURCE2}
|
||||
@ -82,7 +87,11 @@ jar ufm dist/java-cup-%{pkg_version}-runtime.jar %{SOURCE4}
|
||||
|
||||
%mvn_install -J dist/javadoc
|
||||
|
||||
# wrapper script for direct execution
|
||||
%jpackage_script java_cup.Main "" "" java_cup cup true
|
||||
|
||||
%files -f .mfiles
|
||||
%{_bindir}/cup
|
||||
%doc changelog.txt
|
||||
%license licence.txt
|
||||
|
||||
@ -94,8 +103,12 @@ jar ufm dist/java-cup-%{pkg_version}-runtime.jar %{SOURCE4}
|
||||
%license licence.txt
|
||||
|
||||
%changelog
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:0.11b-17
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:0.11b-18
|
||||
- Bootstrap Maven for CentOS Stream 9
|
||||
|
||||
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:0.11b-17
|
||||
- Bootstrap build
|
||||
- Non-bootstrap build
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.11b-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
@ -112,9 +125,15 @@ jar ufm dist/java-cup-%{pkg_version}-runtime.jar %{SOURCE4}
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.11b-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:0.11b-10
|
||||
- Mass rebuild for javapackages-tools 201902
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.11b-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:0.11b-9
|
||||
- Mass rebuild for javapackages-tools 201901
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.11b-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user