]> git.pld-linux.org Git - packages/python-ldaptor.git/blame - python-ldaptor.spec
- added doc bcond
[packages/python-ldaptor.git] / python-ldaptor.spec
CommitLineData
bf356939
JR
1#
2# Conditional build:
3%bcond_with doc # build the documentation
4#
d0b2ae9e 5%define githash 29a06fa
23c5a3f7
JR
6Summary: Python LDAP client library
7Name: python-ldaptor
8Version: 0.0.44
9Release: 0.git%{githash}.0.1
10License: LGPLv2
11Group: Libraries/Python
12Source0: https://codeload.github.com/antong/ldaptor/tar.gz/%{githash}?/python-ldaptor-%{version}.%{githash}.tar.gz
13# Source0-md5: eace8cf1dc3f7061051b019444d57ca6
14Source1: global.cfg
15Patch0: %{name}-remove-webui.patch
16Patch1: %{name}-doc-paths.patch
17URL: https://github.com/antong/ldaptor
bf356939
JR
18BuildRequires: python-distribute
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.219
21%if %{with doc}
23c5a3f7
JR
22BuildRequires: dia
23BuildRequires: docbook-slides
24BuildRequires: docbook-style-xsl
25BuildRequires: epydoc
26BuildRequires: libxslt
27BuildRequires: python-docutils
28BuildRequires: source-highlight
bf356939
JR
29%endif
30Requires: python-modules
23c5a3f7
JR
31Requires: python-TwistedCore
32Requires: python-TwistedNames
33Requires: python-pyparsing
34Requires: python-twisted-mail
35Requires: python-zope-interface
36BuildArch: noarch
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40Ldaptor is LDAP library written in pure Python. The library implements
41LDAP client logic, separately-accessible LDAP and BER protocol message
42generation and parsing, ASCII format LDAP filter generation and
43parsing, LDIF format data generation, and Samba password changing
44logic.
45
46%package doc
47Summary: Documentation for python-ldaptor package
48Group: Libraries/Python
49Requires: %{name} = %{version}-%{release}
50
51%description doc
52The package contains documentation for python-ldaptor package.
53
54%package tools
55Summary: Ldaptor command line utilities
56Group: Libraries/Python
57Requires: %{name} = %{version}-%{release}
58
59%description tools
60The package contains command line utilities build upon python-ldaptor
61library.
62
63
64%prep
65%setup -q -n ldaptor-%{githash}
66# remove deprecated web interface
67rm -rf ldaptor/apps
68rm -rf ldaptor/weave.*
69rm -rf ldaptor/test/web/
70rm -f ldaptor/test/test_webui.*
71%patch0 -p1
72%patch1 -p1
73
74%build
bf356939 75%{__python} setup.py build
23c5a3f7 76
bf356939
JR
77%if %{with doc}
78%{__make} -C doc
23c5a3f7 79epydoc -o doc/api --name Ldaptor ldaptor --exclude 'ldaptor\.test\.' --simple-term
bf356939 80%endif
23c5a3f7
JR
81
82%install
83rm -rf $RPM_BUILD_ROOT
bf356939 84install -d $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
23c5a3f7
JR
85
86%{__python} setup.py install \
87 --root $RPM_BUILD_ROOT
88
bf356939
JR
89# library system-wide configuration and schema
90install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
91install -p ldaptor.schema $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
23c5a3f7
JR
92
93%clean
94rm -rf $RPM_BUILD_ROOT
95
96%files
97%defattr(644,root,root,755)
bf356939 98%doc TODO README.md
23c5a3f7
JR
99%dir %{_sysconfdir}/ldaptor
100%config(noreplace) %{_sysconfdir}/ldaptor/global.cfg
bf356939 101%{_sysconfdir}/ldaptor/ldaptor.schema
23c5a3f7
JR
102%{py_sitescriptdir}/ldaptor-0.0.0-py2.7.egg-info
103%{py_sitescriptdir}/ldaptor
104
bf356939 105%if %{with doc}
23c5a3f7
JR
106%files doc
107%defattr(644,root,root,755)
bf356939
JR
108%doc doc/addressbook-slides/
109%doc doc/api/
110%doc doc/examples/
111%doc doc/ldap-intro/
112%endif
23c5a3f7
JR
113
114%files tools
115%defattr(644,root,root,755)
116%attr(755,root,root) %{_bindir}/ldaptor-*
This page took 0.076704 seconds and 4 git commands to generate.