ldapjdk/ldapjdk.spec
2005-01-21 12:30:14 +00:00

155 lines
4.0 KiB
RPMSpec

%define name ldapjdk
%define spname ldapsp
%define version 4.17
%define tar_name ldapsdk_java
%define tar_version 20020819
%define release 1jpp_1fc
%define section free
%define use_nonfree %{?_with_nonfree:1}%{!?_without_nonfree:0}
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
# FIXME: A jpackage must be created for the
# Mozilla Network Security Services for Java (JSS)
Source2: jss34.jar
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-sasl
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
# 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)
# 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
# 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}
%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 Jan 21 2005 Gary Benson <gbenson@redhat.com> 0:4.17-1jpp_1rh
- Build into Fedora.
* Tue Nov 16 2004 Fernando Nasser <fnasser@redhat.com> 0:4.17-1jpp_1rh
- Merge with upstream for upgrade
* Thu Aug 26 2004 Fernando Nasser <fnasser@redhat.com> 0:4.17-1jpp
- Upgrade to 4.17
- Rebuilt with Ant 1.6.2
* 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.