ldapjdk/ldapjdk.spec

130 lines
3.2 KiB
RPMSpec
Raw Normal View History

%define name ldapjdk
%define spname ldapsp
%define version 4.1
%define tar_name ldapsdk_java
%define tar_version 20000505
%define release 5jpp_1rh
%define section free
Name: %{name}
Version: %{version}
Release: %{release}
Epoch: 0
Summary: The Mozilla LDAP Java SDK
License: MPL
Group: Development/Java
URL: http://www.mozilla.org/directory/javasdk.html
Source0: ftp://ftp.mozilla.org/pub/directory/java-sdk/%{tar_name}_%{tar_version}.tar.gz
#based on the http://bugzilla.mozilla.org/show_bug.cgi?id=55984 zip
Patch0: %{name}-%{version}-DSMLWriter.patch
Patch1: ldapjdk-javaxssl.patch
Requires: oro
Requires: jaas
Requires: jndi
Requires: jpackage-utils >= 0:1.5
Requires: jsse
BuildRequires: oro
BuildRequires: jaas
BuildRequires: jndi
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: jsse
Provides: jndi-ldap = 1.3.0
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
#Distribution: JPackage
#Vendor: JPackage Project
%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 -p1
%patch1 -p0
%build
# cleanup CVS dirs
rm -fr $(find . -name CVS -type d)
# cleanup jars
rm -fr $(find . -name "*.jar" -type f)
mv mozilla/directory/* .
rm -fr mozilla
cd java-sdk
if [ ! -e "$JAVA_HOME" ] ; then export JAVA_HOME="%{_jvmdir}/java" ; fi
export CLASSPATH=$(build-classpath oro jndi jaas jsse)
# 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}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(0644,root,root,0755)
%doc buildjsdk.txt java-sdk/*.htm
%{_javadir}/%{name}*.jar
%{_javadir}/%{spname}*.jar
%{_javadir}-1.3.0/*.jar
%files javadoc
%defattr(0644,root,root,0755)
%dir %{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}-%{version}/*
%changelog
* Fri Mar 5 2004 Frank Ch. Eigler <fche@redhat.com> 0:4.1-5jpp_1rh
- RH vacuuming
- added ldapjdk-javaxssl.patch to stop using com.sun.*
* Sun Sep 28 2003 David Walluck <david@anti-microsoft.org> 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 <Nicolas.Mailhot (at) JPackage.org>
- Initial build.