]> git.pld-linux.org Git - SPECS.git/blob - python-ldaptor.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-ldaptor.spec
1 #
2 # Conditional build:
3 %bcond_without  doc             # build the documentation
4
5 %define         rel     2
6 %define         subver          29a06fa
7 Summary:        Python LDAP client library
8 Name:           python-ldaptor
9 Version:        0.0.44
10 Release:        0.git%{subver}.%{rel}
11 License:        LGPLv2
12 Group:          Libraries/Python
13 Source0:        https://codeload.github.com/antong/ldaptor/tar.gz/%{subver}?/%{name}-%{version}.%{subver}.tar.gz
14 # Source0-md5:  eace8cf1dc3f7061051b019444d57ca6
15 Source1:        global.cfg
16 Patch0:         %{name}-remove-webui.patch
17 Patch1:         %{name}-doc-paths.patch
18 Patch2:         deprecated-exception.patch
19 Patch3:         module-typo.patch
20 Patch4:         sasl.patch
21 Patch5:         starttls-fix.patch
22 Patch6:         unicode.patch
23 Patch7:         abandon.patch
24 URL:            https://github.com/antong/ldaptor
25 BuildRequires:  python-distribute
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.710
28 %if %{with doc}
29 BuildRequires:  dia
30 BuildRequires:  docbook-slides
31 BuildRequires:  docbook-style-xsl
32 BuildRequires:  epydoc
33 BuildRequires:  libxslt
34 BuildRequires:  python-docutils
35 BuildRequires:  source-highlight
36 %endif
37 Requires:       Zope-Interface
38 Requires:       python-Crypto
39 Requires:       python-TwistedCore
40 Requires:       python-TwistedCore-ssl
41 Requires:       python-TwistedMail
42 Requires:       python-TwistedNames
43 Requires:       python-modules
44 Requires:       python-pyOpenSSL
45 Requires:       python-pyparsing
46 BuildArch:      noarch
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 Ldaptor is LDAP library written in pure Python. The library implements
51 LDAP client logic, separately-accessible LDAP and BER protocol message
52 generation and parsing, ASCII format LDAP filter generation and
53 parsing, LDIF format data generation, and Samba password changing
54 logic.
55
56 %package doc
57 Summary:        Documentation for python-ldaptor package
58 Group:          Libraries/Python
59 Requires:       %{name} = %{version}-%{release}
60
61 %description doc
62 The package contains documentation for python-ldaptor package.
63
64 %package tools
65 Summary:        Ldaptor command line utilities
66 Group:          Libraries/Python
67 Requires:       %{name} = %{version}-%{release}
68
69 %description tools
70 The package contains command line utilities build upon python-ldaptor
71 library.
72
73 %prep
74 %setup -q -n ldaptor-%{subver}
75 %patch0 -p1
76 %patch1 -p1
77 %patch2 -p1
78 %patch3 -p1
79 %patch4 -p1
80 %patch5 -p1
81 %patch6 -p1
82 %patch7 -p1
83
84 # remove deprecated web interface
85 %{__rm} -r ldaptor/{apps,weave.*,test/{web,test_webui.*}}
86
87 %{__sed} -i -e 's|/usr/share/xml|/usr/share/sgml|g' doc/Makefile doc/slides-driver.xsl
88
89 %build
90 %py_build
91
92 %if %{with doc}
93 %{__make} -C doc
94 epydoc -o doc/api --name Ldaptor ldaptor --exclude 'ldaptor\.test\.' --simple-term
95 %endif
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
100
101 %py_install \
102         --root $RPM_BUILD_ROOT
103
104 # library system-wide configuration and schema
105 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
106 install -p ldaptor.schema $RPM_BUILD_ROOT%{_sysconfdir}/ldaptor
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %files
112 %defattr(644,root,root,755)
113 %doc TODO README.md
114 %dir %{_sysconfdir}/ldaptor
115 %config(noreplace) %{_sysconfdir}/ldaptor/global.cfg
116 %{_sysconfdir}/ldaptor/ldaptor.schema
117 %{py_sitescriptdir}/ldaptor-0.0.0-py*.egg-info
118 %{py_sitescriptdir}/ldaptor
119
120 %if %{with doc}
121 %files doc
122 %defattr(644,root,root,755)
123 %doc doc/addressbook-slides
124 %doc doc/api
125 %doc doc/examples
126 %doc doc/ldap-intro
127 %endif
128
129 %files tools
130 %defattr(644,root,root,755)
131 %attr(755,root,root) %{_bindir}/ldaptor-*
This page took 4.461367 seconds and 3 git commands to generate.