# 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 %define with_bootstrap 1 Name: java_cup Version: 0.11a Release: 7%{?_dist_release} Summary: Java source interpreter Group: Development/Libraries 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 # Add OSGi manifests Source2: %{name}-MANIFEST.MF Source4: %{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 # Patch from eclipe-pdt to get around generated actions methods exceeding the 65535 bytes limit: # http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/tree/plugins/org.eclipse.php.core.parser/javacup10k_split_do_action_method.diff Patch2: javacup10k_split_do_action_method.diff BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: ant BuildRequires: java-devel BuildRequires: jpackage-utils >= 1.5 #BuildRequires: jflex %if !%{with_bootstrap} BuildRequires: java_cup >= 0.11a %endif BuildRequires: zip Requires: java-headless %description java_cup is a LALR Parser Generator for Java %package javadoc Summary: Javadoc for java_cup Summary(ja): java_cup の Javadoc Group: Documentation %description javadoc Javadoc for java_cup %package manual Summary: Documentation for java_cup Summary(ja): java_cup のドキュメント Group: Documentation %description manual Documentation for java_cup. %prep %setup -q %patch0 -b .build %patch1 -p1 -b .manifest pushd src %patch2 -p1 -b .orig popd cp %{SOURCE1} pom.xml cp %{SOURCE3} . # remove all binary files find -name "*.class" -delete %if ! %{with_bootstrap} # remove prebuilt JFlex rm -rf java_cup-0.11a/bin/JFlex.jar # remove prebuilt java_cup, if not bootstrapping rm -rf java_cup-0.11a/bin/java-cup-11.jar %endif %build %if !%{with_bootstrap} export CLASSPATH=$(build-classpath java_cup java_cup-runtime jflex) %endif ant find . -name parser.cup -exec rm {} \; ant javadoc %install rm -rf $RPM_BUILD_ROOT # inject OSGi manifests mkdir -p META-INF cp -p %{SOURCE2} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip -u dist/java-cup-%{pkg_version}.jar META-INF/MANIFEST.MF cp -p %{SOURCE4} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip -u dist/java-cup-%{pkg_version}-runtime.jar META-INF/MANIFEST.MF # jar install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -m 644 dist/java-cup-%{pkg_version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar install -m 644 dist/java-cup-%{pkg_version}-runtime.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-runtime-%{version}.jar # poms #install -d -m 755 %{buildroot}%{_mavenpomdir} #install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom #add_maven_depmap # javadoc install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -pr dist/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} %clean rm -rf $RPM_BUILD_ROOT #post #update_maven_depmap #postun #update_maven_depmap %files %defattr(0644,root,root,0755) %doc changelog.txt LICENSE.txt %{_javadir}/* %files manual %defattr(0644,root,root,0755) %doc manual.html LICENSE.txt %files javadoc %defattr(0644,root,root,0755) %doc LICENSE.txt %{_javadocdir}/%{name} %changelog * Sat Jan 24 2015 Ryoichi INAGAKI 0.11a-7 - rebuilt on current VineSeed - added Patch1 and Patch2 * Sat Jun 2 2012 Ryoichi INAGAKI 0.11a-6 - rebuilt with rpm-4.8.1-3 - updated URL * Sat Sep 4 2010 Ryoichi INAGAKI 0.11a-5 - Initial build for Vine Linux * 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