diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index c79c486..bfd0d32 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ java_cup_v10k.tar.gz java_cup-0.11a.tar.bz2 +/java_cup-0.11b.tar.bz2 +/java_cup-0.11b.tar.zst diff --git a/0001-Adopt-build-script.patch b/0001-Adopt-build-script.patch new file mode 100644 index 0000000..4d476d5 --- /dev/null +++ b/0001-Adopt-build-script.patch @@ -0,0 +1,53 @@ +From d58d0d2cb2626b15077eaf902f16f7a6bca41933 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Wed, 16 Jul 2025 18:15:17 +0200 +Subject: [PATCH] Adopt build script + +--- + build.xml | 16 +--------------- + 1 file changed, 1 insertion(+), 15 deletions(-) + +diff --git a/build.xml b/build.xml +index 33f0c60..975e753 100644 +--- a/build.xml ++++ b/build.xml +@@ -17,18 +17,6 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- + + + +@@ -69,8 +57,7 @@ + token="+ version_str" + value='+ "v0.11b ${cupversion} (SVN rev ${svnversion})"'> + +- +- ++ + + + +@@ -78,7 +65,6 @@ + + + +- + + + +-- +2.50.1 + diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index ba43a7d..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -CUP Parser Generator Copyright Notice, License, and Disclaimer -Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both the copyright notice and this permission notice and warranty -disclaimer appear in supporting documentation, and that the names of the -authors or their employers not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. - -The authors and their employers disclaim all warranties with regard to -this software, including all implied warranties of merchantability and -fitness. In no event shall the authors or their employers be liable for -any special, indirect or consequential damages or any damages whatsoever -resulting from loss of use, data or profits, whether in an action of -contract, negligence or other tortious action, arising out of or in -connection with the use or performance of this software. diff --git a/changelog b/changelog new file mode 100644 index 0000000..7e4d9d3 --- /dev/null +++ b/changelog @@ -0,0 +1,240 @@ +* Thu Jul 18 2024 Fedora Release Engineering - 1:0.11b-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Feb 29 2024 Jiri Vanek - 1:0.11b-30 +- bump of release for for java-21-openjdk as system jdk + +* Tue Feb 27 2024 Jiri Vanek - 1:0.11b-29 +- Rebuilt for java-21-openjdk as system jdk + +* Wed Feb 21 2024 Marian Koncek - 1:0.11b-28 +- Set OpenJDK version to 1.8 + +* Wed Jan 24 2024 Fedora Release Engineering - 1:0.11b-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jan 20 2024 Fedora Release Engineering - 1:0.11b-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Sep 01 2023 Mikolaj Izdebski - 1:0.11b-25 +- Convert License tag to SPDX format + +* Thu Jul 20 2023 Fedora Release Engineering - 1:0.11b-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 1:0.11b-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 1:0.11b-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Feb 05 2022 Jiri Vanek - 1:0.11b-21 +- Rebuilt for java-17-openjdk as system jdk + +* Thu Jan 20 2022 Fedora Release Engineering - 1:0.11b-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Nov 02 2021 Mikolaj Izdebski - 1:0.11b-19 +- Bump Java compiler source/target levels to 1.7 + +* Thu Jul 22 2021 Fedora Release Engineering - 1:0.11b-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon May 17 2021 Mikolaj Izdebski - 1:0.11b-17 +- Bootstrap build +- Non-bootstrap build + +* Tue Jan 26 2021 Fedora Release Engineering - 1:0.11b-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 1:0.11b-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Jiri Vanek - 1:0.11b-14 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + +* Thu Jun 25 2020 Roland Grunberg - 1:0.11b-13 +- Use source/target of 1.6 to build against Java 11. + +* Wed Jan 29 2020 Fedora Release Engineering - 1:0.11b-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Nov 05 2019 Mikolaj Izdebski - 1:0.11b-10 +- Mass rebuild for javapackages-tools 201902 + +* Thu Jul 25 2019 Fedora Release Engineering - 1:0.11b-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri May 24 2019 Mikolaj Izdebski - 1:0.11b-9 +- Mass rebuild for javapackages-tools 201901 + +* Fri Feb 01 2019 Fedora Release Engineering - 1:0.11b-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1:0.11b-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 1:0.11b-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Sep 25 2017 Mikolaj Izdebski - 1:0.11b-7 +- Elimitate race condition when injecting JAR manifest +- Resolves: rhbz#1495233 + +* Wed Jul 26 2017 Fedora Release Engineering - 1:0.11b-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Mar 22 2017 Michael Simacek - 1:0.11b-5 +- Install with XMvn + +* Fri Feb 10 2017 Fedora Release Engineering - 1:0.11b-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 1:0.11b-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Dec 24 2015 gil cattaneo 1:0.11b-2 +- convert %%defines to %%global + +* Tue Jun 23 2015 Mikolaj Izdebski - 1:0.11b-1 +- Update to upstream version 0.11b + +* Wed Jun 17 2015 Fedora Release Engineering - 1:0.11a-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Feb 06 2015 gil cattaneo 1:0.11a-19 +- introduce license macro + +* Sat Jun 07 2014 Fedora Release Engineering - 1:0.11a-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu May 29 2014 Mikolaj Izdebski - 1:0.11a-17 +- Use .mfiles generated during build + +* Tue Mar 04 2014 Stanislav Ochotnicky - 1:0.11a-16 +- Use Requires: java-headless rebuild (#1067528) + +* Sat Aug 31 2013 Mat Booth - 1:0.11a-15 +- Inject OSGi manifests into both jars. + +* Fri Aug 30 2013 Mat Booth - 1:0.11a-14 +- Patch so that generated action methods do not exceed the 65535 byte JVM + method size limit. Supplied by eclipse-pdt project. +- Drop rpm bug workaround scriptlet. + +* Sat Aug 03 2013 Fedora Release Engineering - 1:0.11a-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 1:0.11a-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Nov 13 2012 gil cattaneo 1:0.11a-11 +- adapt to current guideline +- add %%pre javadoc script + +* Tue Nov 13 2012 Tom Callaway - 1:0.11a-10 +- include copy of LICENSE, correct License tag + +* Thu Jul 19 2012 Fedora Release Engineering - 1:0.11a-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sun Jun 24 2012 Gerard Ryan - 1:0.11a-8 +- Inject OSGI Manifest for java-cup-runtime.jar + +* Fri Jan 13 2012 Fedora Release Engineering - 1:0.11a-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 1:0.11a-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sat Dec 04 2010 Lubomir Rintel 1:0.11a-5 +- Require appropriate packages for depmap maintenance in scriptlets +- Remove classpath from jar manifest + +* Mon Feb 15 2010 Alexander Kurtakov 1:0.11a-4 +- Add maven pom and depmap. + +* Wed Jan 20 2010 Alexander Kurtakov 1:0.11a-3 +- Fix bootstrap. + +* Sun Jan 17 2010 Miloš Jakubíček - 1:0.11a-2 +- Rebuilt in non-bootstrap mode (removed all prebuilt jars). +- Added BR: jflex and java_cup >= 1:0.11a for non-bootstrap mode +- Remove unnecessary R(post,postun): coreutils + +* Fri Jan 8 2010 Alexander Kurtakov 1:0.11a-1 +- Update to 0.11a. +- Drop gcj_support. + +* Fri Jul 24 2009 Fedora Release Engineering - 1:0.10k-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 1:0.10k-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Jul 15 2008 Lubomir Rintel - 1:0.10k-1 +- Fix the version to match upstream, so that FEver can be used + +* Wed Jul 9 2008 Tom "spot" Callaway - 1:0.10-0.k.6.3 +- drop repotag + +* Sun Feb 17 2008 Lubomir Kundrak - 1:0.10-0.k.6jpp.2 +- Ant task +- Clean up to satisfy QA script and rpmlint + +* Fri Aug 04 2006 Vivek Lakshmanan - 1:0.10-0.k.6jpp.1 +- Re-sync with latest version from JPP. +- Partially adopt new naming convention. + +* Sat Jul 22 2006 Jakub Jelinek - 1:0.10-0.k.5jpp_2fc +- Rebuilt + +* Thu Jul 20 2006 Vivek Lakshmanan - 1:0.10-0.k.5jpp_1fc +- Re-sync with latest version from JPP. + +* Wed Jul 19 2006 Vivek Lakshmanan - 1:0.10-0.k.4jpp_1fc +- Conditional native compilation for GCJ. + +* Wed Jul 12 2006 Jesse Keating - 1:0.10-0.k.1jpp_10fc +- rebuild + +* Mon Mar 6 2006 Jeremy Katz - 1:0.10-0.k.1jpp_9fc +- stop scriptlet spew + +* Fri Feb 10 2006 Jesse Keating - 1:0.10-0.k.1jpp_8fc +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 1:0.10-0.k.1jpp_7fc +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Tue Jan 3 2006 Jesse Keating 1:0.10-0.k.1jpp_6fc +- rebuilt again + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Tue Jul 19 2005 Gary Benson 1:0.10-0.k.1jpp_5fc +- Build on ia64, ppc64, s390 and s390x. +- Switch to aot-compile-rpm. + +* Tue Jun 28 2005 Gary Benson 1:0.10-0.k.1jpp_4fc +- BC-compile. + +* Tue Jun 21 2005 Gary Benson 1:0.10-0.k.1jpp_3fc +- Remove classes from the tarball. + +* Thu Nov 4 2004 Gary Benson 1:0.10-0.k.1jpp_2fc +- Build into Fedora. + +* Thu Mar 4 2004 Frank Ch. Eigler 1:0.10-0.k.1jpp_1rh +- RH vacuuming + +* Thu Jan 22 2004 David Walluck 1:0.10-0.k.1jpp +- fix version/release (bump epoch) +- change License tag from Free to BSD-style +- add Distribution tag +- really update for JPackage 1.5 + +* Wed Mar 26 2003 Paul Nasrat 0.10k-1jpp +- for jpackage-utils 1.5 +- New spec reverse engineered from binary rpms diff --git a/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c5aa0e0 --- /dev/null +++ b/ci.fmf @@ -0,0 +1 @@ +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..7b6e38f --- /dev/null +++ b/gating.yaml @@ -0,0 +1,9 @@ +--- !Policy +product_versions: + - fedora-* +decision_contexts: + - bodhi_update_push_testing + - bodhi_update_push_stable +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages.functional} diff --git a/java_cup-0.11a-manifest.patch b/java_cup-0.11a-manifest.patch deleted file mode 100644 index bf0dbcd..0000000 --- a/java_cup-0.11a-manifest.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 447c8beb89190adc2c51c533e93ad26f8eaf34d9 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Sat, 4 Dec 2010 10:27:15 -0500 -Subject: [PATCH] Remove class path from jar manifest - ---- - build.xml | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/build.xml b/build.xml -index 06170de..06e2a7d 100644 ---- a/build.xml -+++ b/build.xml -@@ -62,7 +62,6 @@ - - - -- - - - --- -1.7.3.1 - diff --git a/java_cup-MANIFEST.MF b/java_cup-MANIFEST.MF new file mode 100644 index 0000000..4b3ffba --- /dev/null +++ b/java_cup-MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.4 +Bundle-Name: Java Cup +Bundle-SymbolicName: java_cup +Export-Package: java_cup,java_cup.runtime +Bundle-Version: 0.11.0 +Bundle-ManifestVersion: 2 +Main-Class: java_cup/Main diff --git a/java_cup-build.patch b/java_cup-build.patch deleted file mode 100644 index bd1435d..0000000 --- a/java_cup-build.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- build.xml.sav 2006-03-28 14:34:52.000000000 +0300 -+++ build.xml 2010-01-08 12:50:20.346608627 +0200 -@@ -76,4 +76,19 @@ - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - diff --git a/java_cup-pom.xml b/java_cup-pom.xml deleted file mode 100644 index 66b1d9a..0000000 --- a/java_cup-pom.xml +++ /dev/null @@ -1,10 +0,0 @@ - - 4.0.0 - java_cup - java_cup - jar - Java CUP - 0.11a - diff --git a/java_cup-runtime-MANIFEST.MF b/java_cup-runtime-MANIFEST.MF index 6d79887..a644cbf 100644 --- a/java_cup-runtime-MANIFEST.MF +++ b/java_cup-runtime-MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-Vendor: %providerName Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: J2SE-1.4 -Bundle-Name: %pluginName +Bundle-Name: Java Cup Runtime Bundle-SymbolicName: java_cup.runtime Export-Package: java_cup.runtime Bundle-Version: 0.11.0 diff --git a/java_cup.spec b/java_cup.spec index 5d73d48..9e974d1 100644 --- a/java_cup.spec +++ b/java_cup.spec @@ -1,261 +1,85 @@ -# 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 pkg_version 11a -%define section free -%define with_bootstrap 0 +%bcond_with bootstrap +%global pkg_version 11b Name: java_cup -Version: 0.11a -Release: 11%{?dist} Epoch: 1 -Summary: Java source interpreter -Group: Development/Tools -License: MIT -URL: http://www.cs.princeton.edu/%7Eappel/modern/java/CUP/ -#svn export -r 21 https://www2.in.tum.de/repos/cup/develop/ java_cup-0.11a -#tar cjf java_cup-0.11a.tar.bz2 java_cup-0.11a/ -Source0: java_cup-0.11a.tar.bz2 -Source1: java_cup-pom.xml -Source2: %{name}-runtime-MANIFEST.MF -# Taken from http://www2.cs.tum.edu/projects/cup/ -Source3: LICENSE.txt -Patch0: %{name}-build.patch -Patch1: java_cup-0.11a-manifest.patch +Version: 0.11b +Release: %autorelease +Summary: LALR parser generator for Java +License: SMLNJ +URL: https://www2.cs.tum.edu/projects/cup/ +BuildArch: noarch +ExclusiveArch: %{java_arches} noarch -BuildRequires: ant -BuildRequires: java-devel -BuildRequires: jpackage-utils >= 0:1.5 -BuildRequires: jflex -%if ! %{with_bootstrap} -BuildRequires: java_cup >= 1:0.11a +# git clone https://github.com/DrMichaelPetter/cup.git +# git -C cup archive --prefix java_cup-0.11b/ c35ed3ab0cde2310af9b01321c930349c7c797e2 | zstd -15 >java_cup-0.11b.tar.zst +Source0: java_cup-%{version}.tar.zst +# Add OSGi manifests +Source2: %{name}-MANIFEST.MF +Source4: %{name}-runtime-MANIFEST.MF + +Patch: 0001-Adopt-build-script.patch + +%if %{with bootstrap} +BuildRequires: javapackages-bootstrap +%else +BuildRequires: javapackages-local-openjdk25 +BuildRequires: ant-openjdk25 +BuildRequires: java_cup +BuildRequires: jflex %endif -BuildRequires: zip - -Requires: java -Requires: jpackage-utils -BuildArch: noarch - +# TODO Remove in Fedora 46 +Obsoletes: %{name}-javadoc < 1:0.11b-57 %description java_cup is a LALR Parser Generator for Java -%package javadoc -Summary: Javadoc for java_cup -Group: Documentation -Requires: jpackage-utils - -%description javadoc -Javadoc for java_cup - %package manual Summary: Documentation for java_cup -Group: Documentation %description manual Documentation for java_cup. %prep -%setup -q -%patch0 -b .build -%patch1 -p1 -b .manifest -cp %{SOURCE1} pom.xml -cp %{SOURCE3} . +%autosetup -p1 -C # remove all binary files find -name "*.class" -delete -%if ! %{with_bootstrap} +%mvn_file ':{*}' @1 + # remove prebuilt JFlex -rm -rf java_cup-0.11a/bin/JFlex.jar +rm -rf java_cup-%{version}/bin/JFlex.jar # remove prebuilt java_cup, if not bootstrapping -rm -rf java_cup-0.11a/bin/java-cup-11.jar -%endif +rm -rf java_cup-%{version}/bin/java-cup-11.jar %build -%if ! %{with_bootstrap} export CLASSPATH=$(build-classpath java_cup java_cup-runtime jflex) -%endif -ant -find -name parser.cup -delete -ant javadoc +%ant -Dcupversion=20150326 -Dsvnversion=65 + +# inject OSGi manifests +%jar ufm dist/java-cup-%{pkg_version}.jar %{SOURCE2} +%jar ufm dist/java-cup-%{pkg_version}-runtime.jar %{SOURCE4} %install -# inject OSGi manifest -mkdir -p META-INF -cp -p %{SOURCE2} META-INF/MANIFEST.MF -touch META-INF/MANIFEST.MF -zip -u dist/java-cup-%{pkg_version}-runtime.jar META-INF/MANIFEST.MF +%mvn_artifact %{name}:%{name}:%{version} dist/java-cup-%{pkg_version}.jar +%mvn_artifact %{name}:%{name}-runtime:%{version} dist/java-cup-%{pkg_version}-runtime.jar -# jar -install -d -m 755 %{buildroot}%{_javadir} -install -m 644 dist/java-cup-%{pkg_version}.jar %{buildroot}%{_javadir}/%{name}.jar -install -m 644 dist/java-cup-%{pkg_version}-runtime.jar %{buildroot}%{_javadir}/%{name}-runtime.jar +%mvn_install -# poms -install -d -m 755 %{buildroot}%{_mavenpomdir} -install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom -%add_to_maven_depmap java_cup java_cup %{version} JPP java_cup +# wrapper script for direct execution +%jpackage_script java_cup.Main "" "" java_cup cup true -# javadoc -install -d -m 755 %{buildroot}%{_javadocdir}/%{name} -cp -pr dist/javadoc/* %{buildroot}%{_javadocdir}/%{name} - -%files -%doc changelog.txt LICENSE.txt -%{_javadir}/* -%{_mavenpomdir}/* -%{_mavendepmapfragdir}/* +%files -f .mfiles +%{_bindir}/cup +%doc changelog.txt +%license licence.txt %files manual -%doc manual.html LICENSE.txt - -%pre javadoc -# workaround for rpm bug, can be removed in F-17 -[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \ -rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || : - -%files javadoc -%doc LICENSE.txt -%{_javadocdir}/%{name} +%doc manual.html +%license licence.txt %changelog -* Tue Nov 13 2012 gil cattaneo 1:0.11a-11 -- adapt to current guideline -- add %%pre javadoc script - -* Tue Nov 13 2012 Tom Callaway - 1:0.11a-10 -- include copy of LICENSE, correct License tag - -* Thu Jul 19 2012 Fedora Release Engineering - 1:0.11a-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sun Jun 24 2012 Gerard Ryan - 1:0.11a-8 -- Inject OSGI Manifest for java-cup-runtime.jar - -* Fri Jan 13 2012 Fedora Release Engineering - 1:0.11a-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Wed Feb 09 2011 Fedora Release Engineering - 1:0.11a-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Sat Dec 04 2010 Lubomir Rintel 1:0.11a-5 -- Require appropriate packages for depmap maintenance in scriptlets -- Remove classpath from jar manifest - -* Mon Feb 15 2010 Alexander Kurtakov 1:0.11a-4 -- Add maven pom and depmap. - -* Wed Jan 20 2010 Alexander Kurtakov 1:0.11a-3 -- Fix bootstrap. - -* Sun Jan 17 2010 Miloš Jakubíček - 1:0.11a-2 -- Rebuilt in non-bootstrap mode (removed all prebuilt jars). -- Added BR: jflex and java_cup >= 1:0.11a for non-bootstrap mode -- Remove unnecessary R(post,postun): coreutils - -* Fri Jan 8 2010 Alexander Kurtakov 1:0.11a-1 -- Update to 0.11a. -- Drop gcj_support. - -* Fri Jul 24 2009 Fedora Release Engineering - 1:0.10k-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Feb 25 2009 Fedora Release Engineering - 1:0.10k-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Tue Jul 15 2008 Lubomir Rintel - 1:0.10k-1 -- Fix the version to match upstream, so that FEver can be used - -* Wed Jul 9 2008 Tom "spot" Callaway - 1:0.10-0.k.6.3 -- drop repotag - -* Sun Feb 17 2008 Lubomir Kundrak - 1:0.10-0.k.6jpp.2 -- Ant task -- Clean up to satisfy QA script and rpmlint - -* Fri Aug 04 2006 Vivek Lakshmanan - 1:0.10-0.k.6jpp.1 -- Re-sync with latest version from JPP. -- Partially adopt new naming convention. - -* Sat Jul 22 2006 Jakub Jelinek - 1:0.10-0.k.5jpp_2fc -- Rebuilt - -* Thu Jul 20 2006 Vivek Lakshmanan - 1:0.10-0.k.5jpp_1fc -- Re-sync with latest version from JPP. - -* Wed Jul 19 2006 Vivek Lakshmanan - 1:0.10-0.k.4jpp_1fc -- Conditional native compilation for GCJ. - -* Wed Jul 12 2006 Jesse Keating - 1:0.10-0.k.1jpp_10fc -- rebuild - -* Mon Mar 6 2006 Jeremy Katz - 1:0.10-0.k.1jpp_9fc -- stop scriptlet spew - -* Fri Feb 10 2006 Jesse Keating - 1:0.10-0.k.1jpp_8fc -- bump again for double-long bug on ppc(64) - -* Tue Feb 07 2006 Jesse Keating - 1:0.10-0.k.1jpp_7fc -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Tue Jan 3 2006 Jesse Keating 1:0.10-0.k.1jpp_6fc -- rebuilt again - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Tue Jul 19 2005 Gary Benson 1:0.10-0.k.1jpp_5fc -- Build on ia64, ppc64, s390 and s390x. -- Switch to aot-compile-rpm. - -* Tue Jun 28 2005 Gary Benson 1:0.10-0.k.1jpp_4fc -- BC-compile. - -* Tue Jun 21 2005 Gary Benson 1:0.10-0.k.1jpp_3fc -- Remove classes from the tarball. - -* Thu Nov 4 2004 Gary Benson 1:0.10-0.k.1jpp_2fc -- Build into Fedora. - -* Thu Mar 4 2004 Frank Ch. Eigler 1:0.10-0.k.1jpp_1rh -- RH vacuuming - -* Thu Jan 22 2004 David Walluck 1:0.10-0.k.1jpp -- fix version/release (bump epoch) -- change License tag from Free to BSD-style -- add Distribution tag -- really update for JPackage 1.5 - -* Wed Mar 26 2003 Paul Nasrat 0.10k-1jpp -- for jpackage-utils 1.5 -- New spec reverse engineered from binary rpms +%autochangelog diff --git a/plans/javapackages.fmf b/plans/javapackages.fmf new file mode 100644 index 0000000..ae17c0c --- /dev/null +++ b/plans/javapackages.fmf @@ -0,0 +1,7 @@ +summary: Run javapackages-specific tests +discover: + how: fmf + url: https://gitlab.com/redhat/centos-stream/tests/javapackages.git + ref: f43 +execute: + how: tmt diff --git a/plans/smoke.fmf b/plans/smoke.fmf new file mode 100644 index 0000000..a1e7bfd --- /dev/null +++ b/plans/smoke.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/sources b/sources index d1fa271..3bdd25b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -686765898d356a6d3e780d83b3236f39 java_cup-0.11a.tar.bz2 +SHA512 (java_cup-0.11b.tar.zst) = f999ed5c20c35eb2f86aa5b1720f9f38b2c0729edddfbbabe81779d7221b6d3253b92e1b86d4055d2b9da61b644d2196c3d41b025de455ca67c5448d3f02d233 diff --git a/tests/Sanity/smoke/empty.cup b/tests/Sanity/smoke/empty.cup new file mode 100644 index 0000000..479f98e --- /dev/null +++ b/tests/Sanity/smoke/empty.cup @@ -0,0 +1,2 @@ +non terminal bar; +bar::=; diff --git a/tests/Sanity/smoke/main.fmf b/tests/Sanity/smoke/main.fmf new file mode 100644 index 0000000..b9bed52 --- /dev/null +++ b/tests/Sanity/smoke/main.fmf @@ -0,0 +1,6 @@ +summary: java_cup smoke test +description: | + Test basic functionality of java_cup. +require: + - java_cup + - java-21-openjdk-devel diff --git a/tests/Sanity/smoke/runtest.sh b/tests/Sanity/smoke/runtest.sh new file mode 100755 index 0000000..838cfcd --- /dev/null +++ b/tests/Sanity/smoke/runtest.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Author: Mikolaj Izdebski +. /usr/share/beakerlib/beakerlib.sh + +rlJournalStart + + rlPhaseStartTest "check for presence of cup command" + rlAssertRpm java_cup + rlAssertBinaryOrigin cup java_cup + rlPhaseEnd + + rlPhaseStartTest "display cup version" + rlRun -s "cup -version" 1 + rlAssertGrep "CUP v0" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "generate parser for empty grammar" + java_home=/usr/lib/jvm/java-21-openjdk/bin + jar=/usr/share/java/java_cup-runtime.jar + rlRun -s "cup empty.cup" + rlAssertGrep "0 errors and 0 warnings" $rlRun_LOG + rlAssertGrep "2 terminals, 1 non-terminal, and 2 productions declared" $rlRun_LOG + rlAssertGrep "Code written to" $rlRun_LOG + rlRun "javac -cp ${jar} parser.java sym.java" + rlPhaseEnd + +rlJournalEnd +rlJournalPrintText diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..99fd67e --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,4 @@ +contact: Mikolaj Izdebski +framework: beakerlib +test: ./runtest.sh +tier: 0