From 4b086659b5acd9f9f15f37225c8a92a9efdab754 Mon Sep 17 00:00:00 2001 From: Deepak Bhole Date: Fri, 4 Aug 2006 23:36:32 +0000 Subject: [PATCH] - Added missing requirements. - Remove jaxen requirement, since we don't have it in fc yet. - Merge with fc spec. --- jdom.spec | 136 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 89 insertions(+), 47 deletions(-) diff --git a/jdom.spec b/jdom.spec index f242102..a61548a 100644 --- a/jdom.spec +++ b/jdom.spec @@ -1,27 +1,66 @@ +# 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 _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 section free Name: jdom Version: 1.0 -Release: 1jpp_7fc +Release: 4jpp.1 Epoch: 0 Summary: Java alternative to DOM and SAX License: Apache Software License-like URL: http://www.jdom.org/ Group: Development/Libraries/Java +#http://www.jdom.org/dist/source/jdom-1.0.tar.gz Source0: jdom-1.0-RHCLEAN.tar.bz2 Patch0: %{name}-crosslink.patch Requires: xalan-j2 >= 0:2.2.0 -BuildRequires: jpackage-utils >= 0:1.5 -BuildRequires: java-javadoc -BuildRequires: ant +BuildRequires: ant >= 0:1.6 BuildRequires: xalan-j2 >= 0:2.2.0 - -# libgcj aot-compiled native libraries -BuildRequires: java-gcj-compat-devel >= 1.0.35 -Requires(post): java-gcj-compat >= 1.0.31 -Requires(postun): java-gcj-compat >= 1.0.31 +BuildRequires: jpackage-utils >= 0:1.6 +BuildRequires: java-javadoc +%if ! %{gcj_support} +BuildArch: noarch +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +%if %{gcj_support} +BuildRequires: java-gcj-compat-devel +Requires(post): java-gcj-compat +Requires(postun): java-gcj-compat +%endif + %description JDOM is, quite simply, a Java representation of an XML document. JDOM provides a way to represent that document for easy and efficient @@ -33,7 +72,8 @@ and SAX. %package javadoc Summary: Javadoc for %{name} Group: Development/Documentation -Prereq: coreutils +Requires(post): /bin/rm,/bin/ln +Requires(postun): /bin/rm %description javadoc Javadoc for %{name}. @@ -54,7 +94,6 @@ Demonstrations and samples for %{name}. find . -name "*.jar" -exec rm -f {} \; find . -name "*.class" -exec rm -f {} \; - %build export CLASSPATH=$(build-classpath xalan-j2) sed -e 's| tempf; cp tempf build.xml; rm tempf @@ -78,28 +117,50 @@ ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} cp -pr samples $RPM_BUILD_ROOT%{_datadir}/%{name} -aot-compile-rpm + +%if %{gcj_support} +%{_bindir}/aot-compile-rpm +%endif %clean rm -rf $RPM_BUILD_ROOT -%post -/usr/bin/rebuild-gcj-db %{_libdir} - -%postun -/usr/bin/rebuild-gcj-db %{_libdir} %post javadoc rm -f %{_javadocdir}/%{name} ln -s %{name}-%{version} %{_javadocdir}/%{name} +%postun javadoc +if [ "$1" = "0" ]; then + rm -f %{_javadocdir}/%{name} +fi + +%if %{gcj_support} +%post +if [ -x %{_bindir}/rebuild-gcj-db ] +then + %{_bindir}/rebuild-gcj-db +fi +%endif + +%if %{gcj_support} +%postun +if [ -x %{_bindir}/rebuild-gcj-db ] +then + %{_bindir}/rebuild-gcj-db +fi +%endif + %files %defattr(0644,root,root,0755) %doc CHANGES.txt COMMITTERS.txt LICENSE.txt README.txt TODO.txt -%dir %{_libdir}/gcj/%{name} -%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.* %{_javadir}/%{name}*.jar +%if %{gcj_support} +%dir %attr(-,root,root) %{_libdir}/gcj/%{name} +%attr(-,root,root) %{_libdir}/gcj/%{name}/jdom-1.0.jar.* +%endif + %files javadoc %defattr(0644,root,root,0755) %ghost %doc %{_javadocdir}/%{name} @@ -111,36 +172,17 @@ ln -s %{name}-%{version} %{_javadocdir}/%{name} %changelog -* Sat Jul 22 2006 Jakub Jelinek - 0:1.0-1jpp_7fc -- Rebuilt +* Fri Aug 04 2006 Deepak Bhole - 0:1.0-4jpp.1 +- Added missing requirements. +- Remove jaxen requirement, since we don't have it in fc yet. +- Merge with fc spec. -* Wed Jul 12 2006 Jesse Keating - 0:1.0-1jpp_6fc -- rebuild +* Tue Apr 11 2006 Ralph Apel - 0:1.0-3jpp +- First JPP-1.7 release +- Drop false xalan dependency -* Wed Jun 7 2006 Deepak Bhole - 0:1.0-1jpp_5fc -- Removing .so ownership from demo package - -* Wed Jun 7 2006 Deepak Bhole - 0:1.0-1jpp_4fc -- Build natively -- Remove spurious xml-commons-api requirement - -* Mon Mar 6 2006 Jeremy Katz - 0:1.0-1jpp_3fc -- stop scriptlet spew - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Wed Jun 22 2005 Gary Benson - 0:1.0-1jpp_2fc -- Remove classes from the tarball too. - -* Wed Jun 15 2005 Gary Benson - 0:1.0-1jpp_1fc -- Build into Fedora. - -* Thu Jun 9 2005 Gary Benson -- Remove jarfiles from the tarball. - -* Tue Oct 19 2004 Fernando Nasser - 0:1.0-1jpp_1rh -- First Red Hat build +* Tue Oct 11 2005 Ralph Apel - 0:1.0-2jpp +- Add jaxen to Requires and classpath * Sat Sep 18 2004 Ralph Apel - 0:1.0-1jpp - Upgrade to 1.0 final