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