80a7779
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
80a7779
80f8f66
%define openldap_version 2.1.22
cvsdist c6bdc73
80a7779
### Abstract ###
cvsdist c6bdc73
80a7779
Name: python-ldap
80a7779
Version: 2.3
80a7779
Release: 1%{?dist}
80a7779
Epoch: 0
80a7779
License: PSF - see LICENCE
80a7779
Group: System Environment/Libraries
80a7779
Summary: An object-oriented API to access LDAP directory servers.
80a7779
URL: http://python-ldap.sourceforge.net/
80a7779
BuildRoot: %{_tmppath}/%{name}-%{version}-root
80a7779
Source: python-ldap-%{version}.tar.gz
80a7779
80a7779
### Patches ###
80a7779
80a7779
Patch0: python-ldap-2.2.0-dirs.patch
80a7779
80a7779
### Dependencies ###
cvsdist c6bdc73
80a7779
Requires: openldap >= %{openldap_version}
80a7779
80a7779
### Build Dependencies ###
80a7779
80a7779
# the openldap from RHL <= 9 and RHEL <= 3 is too old for python-ldap
80a7779
BuildRequires: openldap-devel >= %{openldap_version}
80a7779
BuildRequires: openssl-devel
80a7779
BuildRequires: python-devel >= 2.2
80a7779
BuildRequires: cyrus-sasl-devel
10ed0bc
cvsdist c6bdc73
%description
cvsdist c05c915
python-ldap provides an object-oriented API for working with LDAP within
cvsdist c05c915
Python programs.  It allows access to LDAP directory servers by wrapping the 
cvsdist c05c915
OpenLDAP 2.x libraries, and contains modules for other LDAP-related tasks 
cvsdist c05c915
(including processing LDIF, LDAPURLs, LDAPv3 schema, etc.).
cvsdist c6bdc73
cvsdist c6bdc73
%prep
80a7779
%setup -q -n python-ldap-%{version}
10ed0bc
%patch0 -p1 -b .dirs
cvsdist c6bdc73
cvsdist c6bdc73
%build
cvsdist c6bdc73
%{__python} setup.py build
cvsdist c6bdc73
cvsdist c6bdc73
%install
cvsdist c6bdc73
rm -rf $RPM_BUILD_ROOT
cvsdist c6bdc73
%{__python} setup.py install -O1 --root=$RPM_BUILD_ROOT \
cvsdist c6bdc73
  --record=INSTALLED_FILES
cvsdist c6bdc73
sed 's|^\(.*\.pyo\)$|%ghost \1|' < INSTALLED_FILES > %{name}-%{version}.files
80a7779
find $RPM_BUILD_ROOT/%{python_sitearch}/* -type d \
cvsdist c6bdc73
  | sed "s|^$RPM_BUILD_ROOT|%dir |" >> %{name}-%{version}.files
cvsdist c6bdc73
cvsdist c6bdc73
%clean
cvsdist c6bdc73
rm -rf $RPM_BUILD_ROOT
cvsdist c6bdc73
cvsdist c6bdc73
%files -f %{name}-%{version}.files
cvsdist c6bdc73
%defattr(-,root,root,-)
80f8f66
%doc LICENCE CHANGES README TODO Demo
cvsdist c6bdc73
cvsdist c6bdc73
%changelog
80a7779
* Fri Jun 08 2007 Matthew Barnes <mbarnes@redhat.com> - 0:2.3.0-1.fc8
80a7779
- Update to 2.3
80a7779
- Spec file cleanups.
80a7779
d4dbb03
* Thu Dec  7 2006 Jeremy Katz <katzj@redhat.com> - 0:2.2.0-3
d4dbb03
- rebuild against python 2.5
d4dbb03
d4dbb03
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com>
c504ab5
- rebuild
c504ab5
4a4d194
* Wed May 17 2006 Matthew Barnes <mbarnes@redhat.com> - 2.2.0-2
4a4d194
- Put back the epoch line... happy beehive?
4a4d194
10ed0bc
* Tue May 15 2006 Matthew Barnes <mbarnes@redhat.com> - 2.2.0-1
10ed0bc
- Update to 2.2.0
10ed0bc
- Update python-ldap-2.0.6-rpath.patch and rename it to
10ed0bc
  python-ldap-2.2.0-dirs.patch.
10ed0bc
1cc16ae
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0:2.0.6-5.2.1
1cc16ae
- bump again for double-long bug on ppc(64)
1cc16ae
9a38057
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0:2.0.6-5.2
9a38057
- rebuilt for new gcc4.1 snapshot and glibc changes
9a38057
0a08b12
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
0a08b12
- rebuilt
0a08b12
818c55a
* Tue Nov  8 2005 Tomas Mraz <tmraz@redhat.com> - 2.0.6-5
818c55a
- rebuilt with new openssl
818c55a
c4ae1ec
* Tue Mar 22 2005 Warren Togami <wtogami@redhat.com> - 2.0.6-4
80f8f66
- add LICENCE (#150842)
80f8f66
- simplify python reqs
80f8f66
- remove invalid rpath
9a6683f
d5c3015
* Wed Mar 16 2005 Dan Williams <dcbw@redhat.com> - 0:2.0.6-2
d5c3015
- rebuilt to pick up new libssl.so.5
d5c3015
983bb0a
* Tue Feb  8 2005 David Malcolm <dmalcolm@redhat.com> - 0:2.0.6-1
983bb0a
- 2.0.6
983bb0a
658ffb1
* Tue Nov 16 2004 Nalin Dahyabhai <nalin@redhat.com> - 0:2.0.1-3
278c583
- rebuild (#139161)
658ffb1
cvsdist c05c915
* Mon Aug 30 2004 David Malcolm <dmalcolm@redhat.com> - 0:2.0.1-2
cvsdist c05c915
- Rewrote description; added requirement for openldap
cvsdist c05c915
cvsdist c6bdc73
* Tue Aug 17 2004 David Malcolm <dmalcolm@redhat.com> - 0:2.0.1-1
cvsdist c6bdc73
- imported into Red Hat's packaging system from Fedora.us; set release to 1
cvsdist c6bdc73
cvsdist c6bdc73
* Wed Jun 30 2004 Panu Matilainen <pmatilai@welho.com> 0:2.0.1-0.fdr.1
cvsdist c6bdc73
- update to 2.0.1
cvsdist c6bdc73
cvsdist c6bdc73
* Sun Dec 07 2003 Panu Matilainen <pmatilai@welho.com> 0:2.0.0-0.fdr.0.4.pre16
cvsdist c6bdc73
- fix spec permissions + release tag order (bug 1099)
cvsdist c6bdc73
cvsdist c6bdc73
* Sat Dec  6 2003 Ville Skyttä <ville.skytta at iki.fi> 0:2.0.0-0.fdr.0.pre16.3
cvsdist c6bdc73
- Stricter python version requirements.
cvsdist c6bdc73
- BuildRequire openssl-devel.
cvsdist c6bdc73
- Explicitly build *.pyo, install them as %%ghost.
cvsdist c6bdc73
- Own more installed dirs.
cvsdist c6bdc73
- Remove $RPM_BUILD_ROOT at start of %%install.
cvsdist c6bdc73
cvsdist c6bdc73
* Wed Dec 03 2003 Panu Matilainen <pmatilai@welho.com> 0:2.0.0-0.fdr.0.pre16.2
cvsdist c6bdc73
- duh, build requires python-devel, not just python...
cvsdist c6bdc73
cvsdist c6bdc73
* Wed Dec 03 2003 Panu Matilainen <pmatilai@welho.com> 0:2.0.0-0.fdr.0.pre16.1
cvsdist c6bdc73
- Initial Fedora packaging.