update to 4.18 and use fedora's jss package

This commit is contained in:
Dennis Gilmore 2008-02-20 02:29:40 +00:00
parent b1d0234a9c
commit ba67bb9f7c

View File

@ -3,52 +3,40 @@
%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 filtname ldapfilt
%define beansname ldapbeans
%define section free
%define use_nonfree %{?_with_nonfree:1}%{!?_without_nonfree:0}
Name: ldapjdk
Version: 4.17
Release: 2jpp.7
Version: 4.18
Release: 1%{?dist}
Epoch: 0
Summary: The Mozilla LDAP Java SDK
License: MPL
License: MPLv1.1/GPLv2+/LGPLv2+
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
# mkdir ldapjdk-4.18 ;
# cvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot Export -r LDAPJavaSDK_418 DirectorySDKSourceJava
# tar -zcf ldapjdk-4.18,tar.gz ldapjdk-4.18
Source: %{name}-%{version}.tar.gz
Requires: oro
Requires: jaas
Requires: jndi
Requires: jpackage-utils >= 0:1.5
%if %{use_nonfree}
Requires: jaas
Requires: jsse
%endif
Requires: java-sasl
BuildRequires: oro
Requires: jss
BuildRequires: ant
BuildRequires: jaas
BuildRequires: jndi
BuildRequires: jpackage-utils >= 0:1.5
%if %{use_nonfree}
BuildRequires: jaas
BuildRequires: jsse
%endif
BuildRequires: java-devel
BuildRequires: java-sasl
BuildRequires: jss
Provides: jndi-ldap = 1.3.0
%if ! %{gcj_support}
BuildArch: noarch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
@ -70,50 +58,26 @@ 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
# Remove all bundled jars, we must build against build-system jars
rm -f ./mozilla/directory/java-sdk/ldapjdk/lib/{jss32_stub,jsse,jnet,jaas,jndi}.jar
%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
# Link to build-system BRs
( cd mozilla/directory/java-sdk/ldapjdk/lib && build-jar-repository . jss4 jsse jaas jndi )
cd %{name}-%{version}/mozilla/directory/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
sh -x ant -d dist
%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
install -m 644 %{name}-%{version}/mozilla/directory/java-sdk/dist/packages/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -m 644 %{name}-%{version}/mozilla/directory/java-sdk/dist/packages/%{spname}.jar $RPM_BUILD_ROOT%{_javadir}/%{spname}-%{version}.jar
install -m 644 %{name}-%{version}/mozilla/directory/java-sdk/dist/packages/%{filtname}.jar $RPM_BUILD_ROOT%{_javadir}/%{filtname}-%{version}.jar
install -m 644 %{name}-%{version}/mozilla/directory/java-sdk/dist/packages/%{beansname}.jar $RPM_BUILD_ROOT%{_javadir}/%{beansname}-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
for jar in *-%{version}.jar ; do
@ -128,7 +92,7 @@ pushd $RPM_BUILD_ROOT%{_javadir}-1.3.0
popd
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -r java-sdk/dist/doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -r %{name}-%{version}/mozilla/directory/java-sdk/dist/doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
@ -155,14 +119,17 @@ fi
%files
%defattr(0644,root,root,0755)
%doc buildjsdk.txt java-sdk/*.htm
%{_javadir}/%{name}*.jar
%{_javadir}/%{spname}*.jar
%{_javadir}/%{filtname}*.jar
%{_javadir}/%{beansname}*.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.*
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{spname}-%{version}.jar.*
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{filtname}-%{version}.jar.*
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{beansname}-%{version}.jar.*
%endif
%files javadoc
@ -171,6 +138,13 @@ fi
%{_javadocdir}/%{name}-%{version}/*
%changelog
* Tue Feb 19 2008 Dennis Gilmore <dennis@ausil.us> - 4.18-1
- update to 4.18
- spec contents pulled from RHEL5 srpm
- fedora spec changelog
- update buildroot
- use jss from fedora for building
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:4.17-2jpp.7
- Autorebuild for GCC 4.3