Update to new version 0.11a.

This commit is contained in:
Alexander Kurtakov 2010-01-08 11:55:23 +00:00
commit 8f8cca0e3c
6 changed files with 44 additions and 474 deletions

View file

@ -28,37 +28,26 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%define _with_gcj_support 1
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
%define pkg_version v10k
%define pkg_version 11a
%define section free
Name: java_cup
Version: 0.10k
Release: 3
Version: 0.11a
Release: 1%{?dist}
Epoch: 1
Summary: Java source interpreter
License: BSD and LGPLv2
Url: http://www.cs.princeton.edu/%7Eappel/modern/java/CUP/
Source0: http://www.cs.princeton.edu/%7Eappel/modern/java/CUP/%{name}_%{pkg_version}.tar.gz
Source1: %{name}-build.xml
Patch0: http://jflex.de/cup-ant-task.patch
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
Patch0: %{name}-build.patch
BuildRequires: ant
BuildRequires: jpackage-utils >= 0:1.5
Group: Development/Tools
%if ! %{gcj_support}
Buildarch: noarch
%endif
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description
java_cup is a LALR Parser Generator for Java
@ -80,9 +69,8 @@ Group: Documentation
Documentation for java_cup.
%prep
%setup -q -c -n %{name}-%{version}
%patch0 -p0
install -m 644 %{SOURCE1} build.xml
%setup -q
%patch0 -b .sav
# remove all binary files
find . -name "*.class" -exec rm -f {} \;
@ -97,8 +85,8 @@ rm -rf $RPM_BUILD_ROOT
# jar
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 dist/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -m 644 dist/lib/%{name}-runtime.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-runtime-%{version}.jar
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
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do \
ln -sf ${jar} ${jar/-%{version}/}; done)
@ -107,59 +95,28 @@ install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr dist/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
(cd $RPM_BUILD_ROOT%{_javadocdir} && ln -sf %{name}-%{version} %{name})
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}
%postun javadoc
if [ $1 -eq 0 ]; then
rm -f %{_javadocdir}/%{name}
fi
%post
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%postun
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%files
%defattr(0644,root,root,0755)
%doc README LICENSE CHANGELOG
%doc changelog.txt
%{_javadir}/*
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/java_cup-%{version}.jar.*
%attr(-,root,root) %{_libdir}/gcj/%{name}/java_cup-runtime-%{version}.jar.*
%endif
%files manual
%defattr(0644,root,root,0755)
%doc cup_logo.gif manual.html
%doc manual.html
%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}
%doc %{_javadocdir}/%{name}
%changelog
* Fri Jan 8 2010 Alexander Kurtakov <akurtako@redhat.com> 1:0.11a-1
- Update to 0.11a.
- Drop gcj_support.
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.10k-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild