From dfd8d36f29fa6e6e43673450d7acab87b2991d5f Mon Sep 17 00:00:00 2001 From: Deepak Bhole Date: Jul 19 2006 20:44:32 +0000 Subject: Added conditional native compilation. Removed name/release/version defines as applicable. --- diff --git a/avalon-logkit.spec b/avalon-logkit.spec index e0399a4..6c3b95e 100644 --- a/avalon-logkit.spec +++ b/avalon-logkit.spec @@ -1,24 +1,56 @@ +# 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 short_name logkit -%define short_Name LogKit -%define name avalon-%{short_name} -%define version 1.2 -%define release 3jpp_6fc +%define camelcase_short_name LogKit %define section free -Name: %{name} -Version: %{version} -Release: %{release} +Name: avalon-%{short_name} +Version: 1.2 +Release: 4jpp_1fc Epoch: 0 Summary: Java logging toolkit License: Apache Software License Group: Development/Libraries/Java Url: http://avalon.apache.org/%{short_name}/ -Source0: http://jakarta.apache.org/builds/jakarta-avalon/release/logkit/latest/LogKit-1.2-src.tar.gz +#http://jakarta.apache.org/builds/jakarta-avalon/release/logkit/latest/LogKit-1.2-src.tar.gz +Source0: LogKit-1.2-src.tar.gz Patch0: %{name}-build.patch Patch1: %{name}-javadoc.patch Patch2: %{name}-notarget.patch Requires: avalon-framework >= 0:4.1.4 -Requires: servletapi5 +Requires: servlet Requires: jms Requires: jdbc-stdext BuildRequires: jpackage-utils >= 0:1.5 @@ -27,12 +59,20 @@ BuildRequires: javamail BuildRequires: junit BuildRequires: log4j BuildRequires: avalon-framework >= 0:4.1.4 -BuildRequires: servletapi5 +BuildRequires: servlet BuildRequires: jms BuildRequires: jdbc-stdext +%if ! %{gcj_support} BuildArch: noarch +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot +%if %{gcj_support} +BuildRequires: java-gcj-compat-devel +Requires(post): java-gcj-compat +Requires(postun): java-gcj-compat +%endif + %description LogKit is a logging toolkit designed for secure performance orientated logging in applications. To get started using LogKit, it is recomended @@ -41,22 +81,23 @@ that you read the whitepaper and browse the API docs. %package javadoc Summary: Javadoc for %{name} Group: Development/Documentation -Prereq: coreutils %description javadoc Javadoc for %{name}. %prep rm -rf $RPM_BUILD_ROOT -%setup -q -n %{short_Name}-%{version} -%patch +%setup -q -n %{camelcase_short_name}-%{version} + +%patch0 %patch1 -p1 %patch2 -p1 + # remove all binary libs find . -name "*.jar" -exec rm -f {} \; %build -export CLASSPATH=%(build-classpath log4j javamail/mailapi jms servletapi5 jdbc-stdext avalon-framework junit):$PWD/build/classes +export CLASSPATH=%(build-classpath log4j javamail/mailapi jms servlet jdbc-stdext avalon-framework junit):$PWD/build/classes ant clean jar javadocs %install @@ -68,6 +109,10 @@ install -m 644 build/lib/%{short_name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{ install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr build/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +%if %{gcj_support} +%{_bindir}/aot-compile-rpm +%endif + %clean rm -rf $RPM_BUILD_ROOT @@ -80,54 +125,43 @@ if [ "$1" = "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 KEYS LICENSE %{_javadir}/* +%if %{gcj_support} +%attr(-,root,root) %{_libdir}/gcj/%{name} +%endif + %files javadoc %defattr(0644,root,root,0755) %{_javadocdir}/%{name}-%{version} %changelog -* Wed Jul 19 2006 Deepak Bhole - 0:1.2-3jpp_6fc -- Build on all archs. - -* Wed Jul 12 2006 Jesse Keating - 0:1.2-3jpp_5fc -- rebuild - -* Wed Mar 8 2006 Rafael Schloming - 0:1.2-3jpp_4fc -- ecluded s390[x] and ppc64 due to eclipse - -* Mon Mar 6 2006 Jeremy Katz - 0:1.2-3jpp_3fc -- stop scriptlet spew - -* Wed Dec 21 2005 Jesse Keating 0:1.2-3jpp_2fc -- bump again - -* Wed Dec 14 2005 Jesse Keating -- bump for new gcj -- change to not use target= in build.xml - -* Mon Jul 4 2005 Gary Benson 0:1.2-3jpp_1fc -- Reenable building of classes that require jms. -- Build with servletapi5. - -* Tue Jan 11 2005 Gary Benson 0:1.2-2jpp_4fc -- Reenable building of classes that require swing (#130006). - -* Thu Nov 4 2004 Gary Benson 0:1.2-2jpp_3fc -- Build into Fedora. - -* Thu Oct 28 2004 Gary Benson 0:1.2-2jpp_2fc -- Bootstrap into Fedora. +* Wed Jul 19 2006 Deepak Bhole 0:1.2-4jpp_1fc +- Added conditional native compilation. +- Removed name/release/version defines as applicable. * Fri Aug 20 2004 Ralph Apel 0:1.2-3jpp - Build with ant-1.6.2 -* Fri Mar 5 2004 Frank Ch. Eigler 0:1.2-2jpp_1rh -- RH vacuuming - * Fri May 09 2003 David Walluck 0:1.2-2jpp - update for JPackage 1.5