%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 %define section free %define use_nonfree %{?_with_nonfree:1}%{!?_without_nonfree:0} Name: ldapjdk Version: 4.17 Release: 1jpp.7 Epoch: 0 Summary: The Mozilla LDAP Java SDK License: MPL Group: Development/Java URL: http://www.mozilla.org/directory/javasdk.html # This tarball is made by taking the upstream one from # ftp://ftp.mozilla.org/pub/directory/java-sdk/ and # deleting mozilla/directory/java-sdk/ldap{jdk,sp}/lib # as they contain non-distributable jars. Source0: %{tar_name}_%{tar_version}_clean.tar.gz # FIXME: A jpackage must be created for the # Mozilla Network Security Services for Java (JSS) Source2: jss34.jar Patch0: ldap-gjdoc.patch Patch1: ldapsp-gjdoc.patch Requires: oro Requires: jndi Requires: jpackage-utils >= 0:1.5 %if %{use_nonfree} Requires: jaas Requires: jsse %endif Requires: java-sasl BuildRequires: oro BuildRequires: jndi BuildRequires: jpackage-utils >= 0:1.5 %if %{use_nonfree} BuildRequires: jaas BuildRequires: jsse %endif BuildRequires: java-devel BuildRequires: java-sasl Provides: jndi-ldap = 1.3.0 %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 The Mozilla LDAP SDKs enable you to write applications which access, manage, and update the information stored in an LDAP directory. %package javadoc Group: Development/Documentation Summary: Javadoc for %{name} Obsoletes: openjmx-javadoc %description javadoc Javadoc for %{name} %prep %setup -q -c %patch0 -p0 %patch1 -p0 # delete stuff that doesn't work with libgcj (#132524). if java -version 2>&1 | grep -q "gcj"; then (cd mozilla/directory/java-sdk/ldapjdk/netscape/ldap/factory && \ rm -f JSSESocketFactory.java) fi %build # cleanup CVS dirs rm -fr $(find . -name CVS -type d) # make sure there are no proprietary jars here [ `find . -name "*.jar" -type f | wc -l` = 0 ] || exit 1 mv mozilla/directory/* . rm -fr mozilla cd java-sdk if [ ! -e "$JAVA_HOME" ] ; then export JAVA_HOME="%{_jvmdir}/java" ; fi # FIXME: A jpackage must be created for this cp %{SOURCE2} . export CLASSPATH=`pwd`/jss34.jar:%(build-classpath oro jndi jaas jsse sasl) export MOZ_SRC=`pwd` export JAVA_VERSION=1.4 # Main jar %__make -f ldap.mk clean %__make -f ldap.mk %__make -f ldap.mk basepackage %__make -f ldap.mk doc # ldap jdndi service provides %__make -f ldapsp.mk clean %__make -f ldapsp.mk %__make -f ldapsp.mk basepackage %__make -f ldapsp.mk doc %install rm -rf $RPM_BUILD_ROOT install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -m 644 java-sdk/dist/packages/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar install -m 644 java-sdk/dist/packages/%{spname}.jar $RPM_BUILD_ROOT%{_javadir}/%{spname}-%{version}.jar pushd $RPM_BUILD_ROOT%{_javadir} for jar in *-%{version}.jar ; do ln -fs ${jar} $(echo $jar | sed "s|-%{version}.jar|.jar|g") done popd install -d -m 755 $RPM_BUILD_ROOT%{_javadir}-1.3.0 pushd $RPM_BUILD_ROOT%{_javadir}-1.3.0 ln -fs ../java/*%{spname}.jar jndi-ldap.jar 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 %{_javadir}/%{name}*.jar %{_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 * Fri Aug 11 2006 Vivek Lakshmanan 0:4.17-1jpp.7 - Rebuild with new naming convention. * Mon Jul 24 2006 Vivek Lakshmanan 0:4.17-1jpp_6fc - Add conditional native compilation. * Sat Jul 22 2006 Jakub Jelinek - 0:4.17-1jpp_5fc - Rebuilt * Wed Jul 19 2006 Jesse Keating - 0:4.17-1jpp_4fc - fix release - remove silly name, version, release defines. * Wed Jul 12 2006 Jesse Keating - 0:4.17-1jpp_3fc.1.1.2.1 - rebuild * Tue Jul 11 2006 Archit Shah - add java-devel BuildRequires (bug #192530) * Fri Dec 09 2005 Jesse Keating - rebuilt * Sat Nov 5 2005 Archit Shah 0:4.17-1jpp_3fc - Call javadoc with sourcepath to work aroung gjdoc bug (#170611) * Thu Jan 27 2005 Gary Benson 0:4.17-1jpp_2fc - Remove non-distributable files from the source tarball. * Fri Jan 21 2005 Gary Benson 0:4.17-1jpp_1fc - Build into Fedora. * Tue Nov 16 2004 Fernando Nasser 0:4.17-1jpp_1rh - Merge with upstream for upgrade * Thu Aug 26 2004 Fernando Nasser 0:4.17-1jpp - Upgrade to 4.17 - Rebuilt with Ant 1.6.2 * Fri Mar 5 2004 Frank Ch. Eigler 0:4.1-5jpp_1rh - RH vacuuming - added ldapjdk-javaxssl.patch to stop using com.sun.* * Sun Sep 28 2003 David Walluck 0:4.1-5jpp - add Distribution and Vendor tags - fix jpackage-utils requirement - change gmake to %%__make - break %%description lines * Thu Mar 27 2003 Nicolas Mailhot - Initial build.