]> git.pld-linux.org Git - packages/python-ldaptor.git/blob - python-ldaptor.spec
- Requires cleanup
[packages/python-ldaptor.git] / python-ldaptor.spec
1 #
2 # Conditional build:
3 %bcond_with     doc             # build the documentation
4 #
5 %define         githash         29a06fa
6 Summary:        Python LDAP client library
7 Name:           python-ldaptor
8 Version:        0.0.44
9 Release:        0.git%{githash}.0.1
10 License:        LGPLv2
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
14 Source1:        global.cfg
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
21 %if %{with doc}
22 BuildRequires:  dia
23 BuildRequires:  docbook-slides
24 BuildRequires:  docbook-style-xsl
25 BuildRequires:  epydoc
26 BuildRequires:  libxslt
27 BuildRequires:  python-docutils
28 BuildRequires:  source-highlight
29 %endif
30 Requires:       Zope-Interface
31 Requires:       python-modules
32 Requires:       python-pyparsing
33 Requires:       python-TwistedCore
34 Requires:       python-TwistedMail
35 Requires:       python-TwistedNames
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
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
44 logic.
45
46 %package doc
47 Summary:        Documentation for python-ldaptor package
48 Group:          Libraries/Python
49 Requires:       %{name} = %{version}-%{release}
50
51 %description doc
52 The package contains documentation for python-ldaptor package.
53
54 %package tools
55 Summary:        Ldaptor command line utilities
56 Group:          Libraries/Python
57 Requires:       %{name} = %{version}-%{release}
58
59 %description tools
60 The package contains command line utilities build upon python-ldaptor
61 library.
62
63
64 %prep
65 %setup -q -n ldaptor-%{githash}
66 # remove deprecated web interface
67 rm -rf ldaptor/apps
68 rm -rf ldaptor/weave.*
69 rm -rf ldaptor/test/web/
70 rm -f ldaptor/test/test_webui.*
71 %patch0 -p1
72 %patch1 -p1
73
74 %build
75 %{__python} setup.py build
76
77 %if %{with doc}
78 %{__make} -C doc
79 epydoc -o doc/api --name Ldaptor ldaptor --exclude 'ldaptor\.test\.' --simple-term
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
85
86 %{__python} setup.py install \
87         --root $RPM_BUILD_ROOT
88
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
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %files
97 %defattr(644,root,root,755)
98 %doc TODO README.md
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
104
105 %if %{with doc}
106 %files doc
107 %defattr(644,root,root,755)
108 %doc doc/addressbook-slides/
109 %doc doc/api/
110 %doc doc/examples/
111 %doc doc/ldap-intro/
112 %endif
113
114 %files tools
115 %defattr(644,root,root,755)
116 %attr(755,root,root) %{_bindir}/ldaptor-*
This page took 0.081583 seconds and 3 git commands to generate.