diff --git a/ldapjdk-jarnamefix.patch b/ldapjdk-jarnamefix.patch
new file mode 100644
index 0000000..7e873f1
--- /dev/null
+++ b/ldapjdk-jarnamefix.patch
@@ -0,0 +1,14 @@
+diff -up ./mozilla/directory/java-sdk/build.xml.sav ./mozilla/directory/java-sdk/build.xml
+--- ./mozilla/directory/java-sdk/build.xml.sav 2009-03-20 16:41:48.000000000 -0400
++++ ./mozilla/directory/java-sdk/build.xml 2009-03-20 16:42:09.000000000 -0400
+@@ -66,8 +66,8 @@
+
+
+-
+-
++
++
+
+
diff --git a/ldapjdk.spec b/ldapjdk.spec
index 3b4767e..9394ae9 100644
--- a/ldapjdk.spec
+++ b/ldapjdk.spec
@@ -9,7 +9,7 @@
Name: ldapjdk
Version: 4.18
-Release: 3%{?dist}
+Release: 4%{?dist}
Epoch: 0
Summary: The Mozilla LDAP Java SDK
License: MPLv1.1 or GPLv2+ or LGPLv2+
@@ -19,6 +19,7 @@ URL: http://www.mozilla.org/directory/javasdk.html
# 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
+Patch0: %{name}-jarnamefix.patch
Requires: jaas
Requires: jndi
@@ -57,27 +58,30 @@ Obsoletes: openjmx-javadoc
Javadoc for %{name}
%prep
-%setup -q -c
+%setup -q
# 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
+%patch0 -p1
+
%build
# cleanup CVS dirs
rm -fr $(find . -name CVS -type d)
# 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
+pwd
+( cd mozilla/directory/java-sdk/ldapjdk/lib && build-jar-repository -s -p . jss4 jsse jaas jndi )
+cd mozilla/directory/java-sdk
if [ ! -e "$JAVA_HOME" ] ; then export JAVA_HOME="%{_jvmdir}/java" ; fi
-sh -x ant -d dist
+sh -x ant dist
%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
-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
+install -m 644 mozilla/directory/java-sdk/dist/packages/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
+install -m 644 mozilla/directory/java-sdk/dist/packages/%{spname}.jar $RPM_BUILD_ROOT%{_javadir}/%{spname}-%{version}.jar
+install -m 644 mozilla/directory/java-sdk/dist/packages/%{filtname}.jar $RPM_BUILD_ROOT%{_javadir}/%{filtname}-%{version}.jar
+install -m 644 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
@@ -92,7 +96,7 @@ pushd $RPM_BUILD_ROOT%{_javadir}-1.3.0
popd
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-cp -r %{name}-%{version}/mozilla/directory/java-sdk/dist/doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+cp -r mozilla/directory/java-sdk/dist/doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
@@ -138,6 +142,9 @@ fi
%{_javadocdir}/%{name}-%{version}/*
%changelog
+* Fri Mar 20 2009 Deepak Bhole - 0:4.18-4
+- RPM was using pre-built jars before. Fixed that problem.
+
* Wed Feb 25 2009 Fedora Release Engineering - 0:4.18-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild