Added conditional native compilation.

This commit is contained in:
Deepak Bhole 2006-07-21 22:44:34 +00:00
parent 268fce3cee
commit 90a302186f

View File

@ -1,11 +1,13 @@
%define name xml-commons-resolver
%define version 1.1 %define _with_gcj_support 1
%define release 1jpp_9fc
%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 %define section free
Name: %{name} Name: xml-commons-resolver
Version: %{version} Version: 1.1
Release: %{release} Release: 1jpp_10fc
Epoch: 0 Epoch: 0
Summary: Resolver subproject of xml-commons. Summary: Resolver subproject of xml-commons.
License: Apache Software License License: Apache Software License
@ -21,9 +23,17 @@ BuildRequires: jpackage-utils >= 0:1.5
#BuildRequires: %{_bindir}/xsltproc #BuildRequires: %{_bindir}/xsltproc
#BuildRequires: docbook-style-xsl #BuildRequires: docbook-style-xsl
Group: Text Processing/Markup/XML Group: Text Processing/Markup/XML
%if ! %{gcj_support}
BuildArch: noarch BuildArch: noarch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot 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 %description
Resolver subproject of xml-commons. Resolver subproject of xml-commons.
@ -76,6 +86,10 @@ cp %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/xml-resolver
cp %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/xml-xread cp %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/xml-xread
cp %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/xml-xparse cp %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/xml-xparse
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -88,17 +102,40 @@ if [ "$1" = "0" ]; then
rm -f %{_javadocdir}/%{name} rm -f %{_javadocdir}/%{name}
fi 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 %files
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%doc KEYS LICENSE.resolver.txt %doc KEYS LICENSE.resolver.txt
%{_javadir}/* %{_javadir}/*
%attr(0755,root,root) %{_bindir}/* %attr(0755,root,root) %{_bindir}/*
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}
%endif
%files javadoc %files javadoc
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version} %{_javadocdir}/%{name}-%{version}
%changelog %changelog
* Fri Jul 21 2006 Deepak Bhole <dbhole@redhat.com> - 0:1.1-1jpp_10fc
- Added conditional native compilation.
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0:1.1-1jpp_9fc * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0:1.1-1jpp_9fc
- rebuild - rebuild