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 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 spname ldapsp
%define tar_name ldapsdk_java %define filtname ldapfilt
%define tar_version 20020819 %define beansname ldapbeans
%define section free %define section free
%define use_nonfree %{?_with_nonfree:1}%{!?_without_nonfree:0}
Name: ldapjdk Name: ldapjdk
Version: 4.17 Version: 4.18
Release: 2jpp.7 Release: 1%{?dist}
Epoch: 0 Epoch: 0
Summary: The Mozilla LDAP Java SDK Summary: The Mozilla LDAP Java SDK
License: MPL License: MPLv1.1/GPLv2+/LGPLv2+
Group: Development/Java Group: Development/Java
URL: http://www.mozilla.org/directory/javasdk.html URL: http://www.mozilla.org/directory/javasdk.html
# This tarball is made by taking the upstream one from # mkdir ldapjdk-4.18 ;
# ftp://ftp.mozilla.org/pub/directory/java-sdk/ and # cvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot Export -r LDAPJavaSDK_418 DirectorySDKSourceJava
# deleting mozilla/directory/java-sdk/ldap{jdk,sp}/lib # tar -zcf ldapjdk-4.18,tar.gz ldapjdk-4.18
# as they contain non-distributable jars. Source: %{name}-%{version}.tar.gz
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: jaas
Requires: jndi Requires: jndi
Requires: jpackage-utils >= 0:1.5 Requires: jpackage-utils >= 0:1.5
%if %{use_nonfree}
Requires: jaas
Requires: jsse Requires: jsse
%endif Requires: jss
Requires: java-sasl BuildRequires: ant
BuildRequires: oro BuildRequires: jaas
BuildRequires: jndi BuildRequires: jndi
BuildRequires: jpackage-utils >= 0:1.5 BuildRequires: jpackage-utils >= 0:1.5
%if %{use_nonfree}
BuildRequires: jaas
BuildRequires: jsse BuildRequires: jsse
%endif BuildRequires: jss
BuildRequires: java-devel
BuildRequires: java-sasl
Provides: jndi-ldap = 1.3.0 Provides: jndi-ldap = 1.3.0
%if ! %{gcj_support} %if ! %{gcj_support}
BuildArch: noarch BuildArch: noarch
%endif %endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{gcj_support} %if %{gcj_support}
BuildRequires: java-gcj-compat-devel BuildRequires: java-gcj-compat-devel
@ -70,50 +58,26 @@ Javadoc for %{name}
%prep %prep
%setup -q -c %setup -q -c
%patch0 -p0 # Remove all bundled jars, we must build against build-system jars
%patch1 -p0 rm -f ./mozilla/directory/java-sdk/ldapjdk/lib/{jss32_stub,jsse,jnet,jaas,jndi}.jar
# 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 %build
# cleanup CVS dirs # cleanup CVS dirs
rm -fr $(find . -name CVS -type d) rm -fr $(find . -name CVS -type d)
# make sure there are no proprietary jars here # Link to build-system BRs
[ `find . -name "*.jar" -type f | wc -l` = 0 ] || exit 1 ( cd mozilla/directory/java-sdk/ldapjdk/lib && build-jar-repository . jss4 jsse jaas jndi )
mv mozilla/directory/* . cd %{name}-%{version}/mozilla/directory/java-sdk
rm -fr mozilla
cd java-sdk
if [ ! -e "$JAVA_HOME" ] ; then export JAVA_HOME="%{_jvmdir}/java" ; fi if [ ! -e "$JAVA_HOME" ] ; then export JAVA_HOME="%{_jvmdir}/java" ; fi
sh -x ant -d dist
# 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 %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT%{_javadir} 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 %{name}-%{version}/mozilla/directory/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/%{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} pushd $RPM_BUILD_ROOT%{_javadir}
for jar in *-%{version}.jar ; do for jar in *-%{version}.jar ; do
@ -128,7 +92,7 @@ pushd $RPM_BUILD_ROOT%{_javadir}-1.3.0
popd popd
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} 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} %if %{gcj_support}
%{_bindir}/aot-compile-rpm %{_bindir}/aot-compile-rpm
@ -155,14 +119,17 @@ fi
%files %files
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%doc buildjsdk.txt java-sdk/*.htm
%{_javadir}/%{name}*.jar %{_javadir}/%{name}*.jar
%{_javadir}/%{spname}*.jar %{_javadir}/%{spname}*.jar
%{_javadir}/%{filtname}*.jar
%{_javadir}/%{beansname}*.jar
%{_javadir}-1.3.0/*.jar %{_javadir}-1.3.0/*.jar
%if %{gcj_support} %if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}/ldapjdk-4.17.jar.* %attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%attr(-,root,root) %{_libdir}/gcj/%{name}/ldapsp-4.17.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 %endif
%files javadoc %files javadoc
@ -171,6 +138,13 @@ fi
%{_javadocdir}/%{name}-%{version}/* %{_javadocdir}/%{name}-%{version}/*
%changelog %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 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:4.17-2jpp.7
- Autorebuild for GCC 4.3 - Autorebuild for GCC 4.3