- Add conditional native compilation for GCJ.

This commit is contained in:
Vivek Lakshmanan 2006-07-24 19:29:52 +00:00
parent 78a91da16f
commit 58266d98d7

View File

@ -1,3 +1,7 @@
%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 spname ldapsp
%define tar_name ldapsdk_java
%define tar_version 20020819
@ -6,7 +10,7 @@
Name: ldapjdk
Version: 4.17
Release: 1jpp_5fc
Release: 1jpp_6fc
Epoch: 0
Summary: The Mozilla LDAP Java SDK
License: MPL
@ -27,10 +31,10 @@ Requires: oro
Requires: jndi
Requires: jpackage-utils >= 0:1.5
%if %{use_nonfree}
Requires: jaas
Requires: jaas
Requires: jsse
%endif
Requires: java-sasl
Requires: java-sasl
BuildRequires: oro
BuildRequires: jndi
BuildRequires: jpackage-utils >= 0:1.5
@ -41,10 +45,16 @@ BuildRequires: jsse
BuildRequires: java-devel
BuildRequires: java-sasl
Provides: jndi-ldap = 1.3.0
%if ! %{gcj_support}
BuildArch: noarch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
#Distribution: JPackage
#Vendor: JPackage Project
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description
The Mozilla LDAP SDKs enable you to write applications which access,
@ -120,9 +130,29 @@ popd
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -r java-sdk/dist/doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%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 buildjsdk.txt java-sdk/*.htm
@ -130,12 +160,20 @@ rm -rf $RPM_BUILD_ROOT
%{_javadir}/%{spname}*.jar
%{_javadir}-1.3.0/*.jar
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}/ldapjdk-4.17.jar.*
%attr(-,root,root) %{_libdir}/gcj/%{name}/ldapsp-4.17.jar.*
%endif
%files javadoc
%defattr(0644,root,root,0755)
%dir %{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}-%{version}/*
%changelog
* Mon Jul 24 2006 Vivek Lakshmanan <vivekl@redhat.com> 0:4.17-1jpp_6fc
- Add conditional native compilation.
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:4.17-1jpp_5fc
- Rebuilt