3 %bcond_with doc # build the documentation
5 %define githash 29a06fa
6 Summary: Python LDAP client library
9 Release: 0.git%{githash}.0.1
11 Group: Libraries/Python
12 Source0: https://codeload.github.com/antong/ldaptor/tar.gz/%{githash}?/python-ldaptor-%{version}.%{githash}.tar.gz
13 # Source0-md5: eace8cf1dc3f7061051b019444d57ca6
15 Patch0: %{name}-remove-webui.patch
16 Patch1: %{name}-doc-paths.patch
17 URL: https://github.com/antong/ldaptor
18 BuildRequires: python-distribute
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.219
23 BuildRequires: docbook-slides
24 BuildRequires: docbook-style-xsl
26 BuildRequires: libxslt
27 BuildRequires: python-docutils
28 BuildRequires: source-highlight
30 Requires: Zope-Interface
31 Requires: python-modules
32 Requires: python-pyparsing
33 Requires: python-TwistedCore
34 Requires: python-TwistedMail
35 Requires: python-TwistedNames
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Ldaptor is LDAP library written in pure Python. The library implements
41 LDAP client logic, separately-accessible LDAP and BER protocol message
42 generation and parsing, ASCII format LDAP filter generation and
43 parsing, LDIF format data generation, and Samba password changing
47 Summary: Documentation for python-ldaptor package
48 Group: Libraries/Python
49 Requires: %{name} = %{version}-%{release}
52 The package contains documentation for python-ldaptor package.
55 Summary: Ldaptor command line utilities
56 Group: Libraries/Python
57 Requires: %{name} = %{version}-%{release}
60 The package contains command line utilities build upon python-ldaptor
65 %setup -q -n ldaptor-%{githash}
66 # remove deprecated web interface
68 rm -rf ldaptor/weave.*
69 rm -rf ldaptor/test/web/
70 rm -f ldaptor/test/test_webui.*
75 %{__python} setup.py build
79 epydoc -o doc/api --name Ldaptor ldaptor --exclude 'ldaptor\.test\.' --simple-term
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
86 %{__python} setup.py install \
87 --root $RPM_BUILD_ROOT
89 # library system-wide configuration and schema
90 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
91 install -p ldaptor.schema $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
94 rm -rf $RPM_BUILD_ROOT
97 %defattr(644,root,root,755)
99 %dir %{_sysconfdir}/ldaptor
100 %config(noreplace) %{_sysconfdir}/ldaptor/global.cfg
101 %{_sysconfdir}/ldaptor/ldaptor.schema
102 %{py_sitescriptdir}/ldaptor-0.0.0-py2.7.egg-info
103 %{py_sitescriptdir}/ldaptor
107 %defattr(644,root,root,755)
108 %doc doc/addressbook-slides/
115 %defattr(644,root,root,755)
116 %attr(755,root,root) %{_bindir}/ldaptor-*