196 lines
5.8 KiB
RPMSpec
196 lines
5.8 KiB
RPMSpec
#
|
|
# spec file for package java-cup-bootstrap (Version 0.11)
|
|
#
|
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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 http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
|
|
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
|
|
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
|
|
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
|
|
##### WARNING: please do not edit this auto generated spec file. Use the java-cup.spec! #####
|
|
%define with_bootstrap 1
|
|
%bcond_with bootstrap
|
|
%define section free
|
|
%define cvs_version 11a
|
|
%define real_name java-cup
|
|
|
|
Name: java-cup-bootstrap
|
|
# This line is not a comment, please do not remove it!
|
|
#%(sh %{_sourcedir}/jpackage-bootstrap-prepare.sh %{_sourcedir} %{name})
|
|
Version: 0.11
|
|
Release: 3
|
|
Summary: LALR Parser Generator in Java
|
|
License: Other uncritical OpenSource License
|
|
Url: http://www2.cs.tum.edu/projects/cup/
|
|
# https://www2.in.tum.de/WebSVN/dl.php?repname=CUP&path=/develop/&rev=0&isdir=1
|
|
Source0: develop.tar.bz2
|
|
Source1: java-cup.script
|
|
Source2: java-cup-generated-files.tar.bz2
|
|
# From http://www2.cs.tum.edu/projects/cup/
|
|
Source3: java-cup.license
|
|
Patch0: java-cup-javadoc.patch
|
|
Patch1: java-cup-no-classpath-in-manifest.patch
|
|
Patch2: java-cup-no-cup-no-jflex.patch
|
|
Patch3: java-cup-classpath.patch
|
|
# Missing symbolFactory initialization in lr_parser, causes sinjdoc to crash
|
|
Patch4: java-cup-lr_parser-constructor.patch
|
|
BuildRequires: ant
|
|
%if %without bootstrap
|
|
BuildRequires: java-cup-bootstrap
|
|
BuildRequires: jflex
|
|
%endif
|
|
BuildRequires: java-1_5_0-gcj-compat-devel
|
|
Obsoletes: java_cup < %{version}-%{release}
|
|
Provides: java_cup = %{version}-%{release}
|
|
Group: Development/Libraries/Java
|
|
BuildArch: noarch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
java-cup is a LALR Parser Generator in Java. With v0.11, you can: *
|
|
use CUP in an Ant-Target
|
|
|
|
* start CUP by a simple command like java -jar java-cup-11a.jar
|
|
myGrammar.cup
|
|
|
|
* use generic parametrized classes (since Java 1.5) as datatypes for
|
|
non
|
|
|
|
* terminals and terminals
|
|
|
|
* have Your own symbol classes
|
|
|
|
|
|
|
|
%if %without bootstrap
|
|
|
|
%package javadoc
|
|
License: Other uncritical OpenSource License
|
|
Summary: LALR Parser Generator in Java
|
|
Group: Development/Libraries/Java
|
|
|
|
%description javadoc
|
|
java-cup is a LALR Parser Generator in Java. With v0.11, you can: *
|
|
use CUP in an Ant-Target
|
|
|
|
* start CUP by a simple command like java -jar java-cup-11a.jar
|
|
myGrammar.cup
|
|
|
|
* use generic parametrized classes (since Java 1.5) as datatypes for
|
|
non
|
|
|
|
* terminals and terminals
|
|
|
|
* have Your own symbol classes
|
|
|
|
|
|
|
|
%package manual
|
|
License: Other uncritical OpenSource License
|
|
Summary: LALR Parser Generator in Java
|
|
Group: Development/Libraries/Java
|
|
|
|
%description manual
|
|
java-cup is a LALR Parser Generator in Java. With v0.11, you can: *
|
|
use CUP in an Ant-Target
|
|
|
|
* start CUP by a simple command like java -jar java-cup-11a.jar
|
|
myGrammar.cup
|
|
|
|
* use generic parametrized classes (since Java 1.5) as datatypes for
|
|
non
|
|
|
|
* terminals and terminals
|
|
|
|
* have Your own symbol classes
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%prep
|
|
%setup -q -n develop
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%if %with bootstrap
|
|
%setup -q -T -D -a 2 -n develop
|
|
%patch2 -p1
|
|
%else
|
|
%{_bindir}/find . -name '*.jar' | %{_bindir}/xargs %{__rm}
|
|
%patch3 -p1
|
|
%endif
|
|
%patch4 -p1
|
|
%{__perl} -pi -e 's/1\.2/1.5/g' build.xml
|
|
%{__mkdir_p} classes dist
|
|
cp %{SOURCE3} license.txt
|
|
|
|
%build
|
|
%if %with bootstrap
|
|
export CLASSPATH=
|
|
%else
|
|
export CLASSPATH=$(build-classpath java-cup jflex)
|
|
%endif
|
|
export OPT_JAR_LIST=:
|
|
%ant
|
|
%if %without bootstrap
|
|
%ant javadoc
|
|
%endif
|
|
|
|
%install
|
|
# jar
|
|
%{__mkdir_p} %{buildroot}%{_javadir}
|
|
%{__cp} -a dist/%{real_name}-%{cvs_version}.jar %{buildroot}%{_javadir}/%{real_name}-%{version}.jar
|
|
%{__cp} -a dist/%{real_name}-%{cvs_version}-runtime.jar %{buildroot}%{_javadir}/%{real_name}-runtime-%{version}.jar
|
|
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %{__ln_s} ${jar} ${jar/-%{version}/}; done)
|
|
# compatibility symlinks
|
|
(cd %{buildroot}%{_javadir} && %{__ln_s} %{real_name}.jar java_cup.jar && %{__ln_s} %{real_name}-runtime.jar java_cup-runtime.jar)
|
|
%if %without bootstrap
|
|
# javadoc
|
|
%{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version}
|
|
%{__cp} -a dist/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
|
(cd %{buildroot}%{_javadocdir} && %{__ln_s} %{name}-%{version} %{name})
|
|
%endif
|
|
%{__mkdir_p} %{buildroot}%{_bindir}
|
|
%{__install} -p -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{real_name}
|
|
|
|
%clean
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(0644,root,root,0755)
|
|
%doc changelog.txt license.txt
|
|
%attr(0755,root,root) %{_bindir}/%{real_name}
|
|
%{_javadir}/*
|
|
%if %without bootstrap
|
|
|
|
%files manual
|
|
%defattr(0644,root,root,0755)
|
|
%doc manual.html
|
|
|
|
%files javadoc
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadocdir}/%{name}-%{version}
|
|
%{_javadocdir}/%{name}
|
|
%endif
|
|
|
|
%changelog
|
|
* Mon May 11 2009 mvyskocil@suse.cz
|
|
- Fixed bnc#501635: Added a lincense file
|
|
* Tue May 05 2009 mvyskocil@suse.cz
|
|
- Build using gcj (for proper bootstrap of openjdk)
|
|
* Wed Apr 29 2009 mvyskocil@suse.cz
|
|
- Initial packaging of java-cup-bootstrap 0.11 in SUSE (from jpp5)
|