3 %bcond_without doc # build the documentation
5 %define githash 29a06fa
6 Summary: Python LDAP client library
9 Release: 0.git%{githash}.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 Patch2: deprecated-exception.patch
18 Patch3: module-typo.patch
20 Patch5: starttls-fix.patch
23 URL: https://github.com/antong/ldaptor
24 BuildRequires: python-distribute
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.219
29 BuildRequires: docbook-slides
30 BuildRequires: docbook-style-xsl
32 BuildRequires: libxslt
33 BuildRequires: python-docutils
34 BuildRequires: source-highlight
36 Requires: Zope-Interface
37 Requires: python-Crypto
38 Requires: python-TwistedCore
39 Requires: python-TwistedCore-ssl
40 Requires: python-TwistedMail
41 Requires: python-TwistedNames
42 Requires: python-modules
43 Requires: python-pyOpenSSL
44 Requires: python-pyparsing
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Ldaptor is LDAP library written in pure Python. The library implements
50 LDAP client logic, separately-accessible LDAP and BER protocol message
51 generation and parsing, ASCII format LDAP filter generation and
52 parsing, LDIF format data generation, and Samba password changing
56 Summary: Documentation for python-ldaptor package
57 Group: Libraries/Python
58 Requires: %{name} = %{version}-%{release}
61 The package contains documentation for python-ldaptor package.
64 Summary: Ldaptor command line utilities
65 Group: Libraries/Python
66 Requires: %{name} = %{version}-%{release}
69 The package contains command line utilities build upon python-ldaptor
73 %setup -q -n ldaptor-%{githash}
83 # remove deprecated web interface
84 %{__rm} -r ldaptor/{apps,weave.*,test/{web,test_webui.*}}
86 %{__sed} -i -e 's|/usr/share/xml|/usr/share/sgml|g' doc/Makefile doc/slides-driver.xsl
93 epydoc -o doc/api --name Ldaptor ldaptor --exclude 'ldaptor\.test\.' --simple-term
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
101 --root $RPM_BUILD_ROOT
103 # library system-wide configuration and schema
104 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
105 install -p ldaptor.schema $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
108 rm -rf $RPM_BUILD_ROOT
111 %defattr(644,root,root,755)
113 %dir %{_sysconfdir}/ldaptor
114 %config(noreplace) %{_sysconfdir}/ldaptor/global.cfg
115 %{_sysconfdir}/ldaptor/ldaptor.schema
116 %{py_sitescriptdir}/ldaptor-0.0.0-py2.7.egg-info
117 %{py_sitescriptdir}/ldaptor
121 %defattr(644,root,root,755)
122 %doc doc/addressbook-slides
129 %defattr(644,root,root,755)
130 %attr(755,root,root) %{_bindir}/ldaptor-*