diff --git a/README.md b/README.md index 8288be4..1361dd5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # python-ldap +python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. +Mainly it wraps the OpenLDAP 2.x libs for that purpose. +Additionally the package contains modules for other LDAP-related stuff (e.g. processing LDIF, LDAPURLs, LDAPv3 schema, etc.). + diff --git a/python-ldap-2.2.0-sasl.patch b/python-ldap-2.2.0-sasl.patch new file mode 100644 index 0000000..794e70c --- /dev/null +++ b/python-ldap-2.2.0-sasl.patch @@ -0,0 +1,11 @@ +--- python-ldap-2.2.0/Modules/LDAPObject.c.orig 2006-10-20 15:50:37.000000000 +0200 ++++ python-ldap-2.2.0/Modules/LDAPObject.c 2006-10-20 15:51:06.000000000 +0200 +@@ -19,7 +19,7 @@ + #include "options.h" + + #ifdef HAVE_SASL +-#include ++#include + #endif + + static void free_attrs(char***); diff --git a/python-ldap-2.3.5-setupcfg.patch b/python-ldap-2.3.5-setupcfg.patch new file mode 100644 index 0000000..cf7bbab --- /dev/null +++ b/python-ldap-2.3.5-setupcfg.patch @@ -0,0 +1,14 @@ +diff -Nru python-ldap-2.3.5.orig/setup.cfg python-ldap-2.3.5/setup.cfg +--- python-ldap-2.3.5.orig/setup.cfg 2008-07-06 17:04:13.000000000 +0200 ++++ python-ldap-2.3.5/setup.cfg 2009-01-27 03:07:36.000000000 +0100 +@@ -2,8 +2,8 @@ + extra_objects = + extra_compile_args = + libs = ldap_r lber sasl2 ssl crypto +-library_dirs = /usr/local/openldap-2.3/lib +-include_dirs = /usr/local/openldap-2.3/include /usr/include/sasl ++library_dirs = /usr/lib ++include_dirs = /usr/include + + [egg_info] + tag_build = diff --git a/python-ldap.spec b/python-ldap.spec new file mode 100644 index 0000000..18a4559 --- /dev/null +++ b/python-ldap.spec @@ -0,0 +1,78 @@ +Name: python-ldap +Version: 2.3.6 +Release: 2mamba +Summary: An object-oriented API to access LDAP directory servers from Python programs +Group: System/Libraries/Python +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://python-ldap.sourceforge.net/ +Source: http://downloads.sourceforge.net/sourceforge/python-ldap/python-ldap-%{version}.tar.gz +Patch0: %{name}-2.3.5-setupcfg.patch +Patch1: %{name}-2.2.0-sasl.patch +License: GPL +BuildRequires: libpython-devel +Requires: python >= %{pyver} +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +# FIXME: +# file Lib/ldap.py (for module ldap) not found +# file Lib/ldap/schema.py (for module ldap.schema) not found + +%description +python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. +Mainly it wraps the OpenLDAP 2.x libs for that purpose. +Additionally the package contains modules for other LDAP-related stuff (e.g. processing LDIF, LDAPURLs, LDAPv3 schema, etc.). + +%prep +%setup -q +#%patch0 -p1 +%patch1 -p1 + +%build +export CFLAGS="%{optflags}" +%{__python} setup.py build + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +%{__python} setup.py install \ + --root=%{buildroot} \ + --install-headers=%{_includedir}/python \ + --install-lib=%{python_sitearch} + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{python_sitearch}/*.so +%{python_sitearch}/*.py* +%{python_sitearch}/python_ldap-%{version}-*-info/* +%dir %{python_sitearch}/ldap +%{python_sitearch}/ldap/*.py* +%dir %{python_sitearch}/ldap/schema +%{python_sitearch}/ldap/schema/*.py* +%doc CHANGES LICENCE README TODO +%doc Demo + +%changelog +* Fri May 17 2013 Silvan Calarco 2.3.6-2mamba +- python 2.7 mass rebuild + +* Mon Mar 30 2009 Silvan Calarco 2.3.6-1mamba +- automatic update by autodist + +* Fri Jan 30 2009 Silvan Calarco 2.3.5-1mamba +- automatic update by autodist + +* Fri Oct 20 2006 Davide Madrisan 2.2.0-1qilnx +- update to version 2.2.0 by autospec +- added documentation +- fixed license +- install the library file in the %%python_sitearch directory + +* Tue Aug 09 2005 Silvan Calarco 2.0.9-1qilnx +- update to version 2.0.9 by autospec + +* Wed Mar 16 2005 Silvan Calarco 2.0.6-1qilnx +- package created by autospec