]>
Commit | Line | Data |
---|---|---|
43b91b2d JK |
1 | %include /usr/lib/rpm/macros.python |
2 | Summary: WWW gateway to LDAP server | |
3 | Summary(pl): Bramka WWW do serwera LDAP | |
4 | Name: web2ldap | |
5 | Version: 0.11.9 | |
6 | Release: 1 | |
7 | License: distributable (mostly GPL) | |
8 | Group: Applications | |
9 | Source0: http://www.web2ldap.de/download/%{name}-%{version}.tar.gz | |
10 | Patch0: %{name}-config.patch | |
11 | URL: http://www.web2ldap.de/ | |
12 | %pyrequires_eq python-modules | |
13 | Requires: python-ldap | |
14 | Requires: python-PyWebLib | |
15 | BuildArch: noarch | |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %description | |
19 | This is: | |
20 | - a generic LDAPv3 client which does not make any assumptions about the tree | |
21 | structure or LDAP schema. | |
22 | - kind of a swiss-army knife for accessing/manipulating LDAP servers without | |
23 | having to configure anything. | |
24 | - a secure LDAP client with clean login behaviour. | |
25 | - a schema browser which displays references/dependencies within an LDAPv3 | |
26 | schema. | |
27 | - continously maintained software. | |
28 | ||
29 | %prep | |
30 | %setup -q | |
31 | %patch0 -p1 | |
32 | ||
33 | %build | |
34 | for dir in fcgi pylib scgi templates sbin; do | |
35 | python -c "import compileall; compileall.compile_dir('$dir')" | |
36 | python -O -c "import compileall; compileall.compile_dir('$dir')" | |
37 | done | |
38 | ||
39 | %install | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_datadir}/%{name}} \ | |
42 | $RPM_BUILD_ROOT/var{/run,/lib,/log}/%{name} | |
43 | ||
44 | cp -R etc/web2ldap $RPM_BUILD_ROOT%{_sysconfdir} | |
45 | cp -R fcgi pylib scgi templates sbin $RPM_BUILD_ROOT%{_datadir}/%{name} | |
46 | find $RPM_BUILD_ROOT%{_datadir}/%{name} -name "*.py" | xargs rm | |
47 | echo '#!/bin/sh' > $RPM_BUILD_ROOT%{_sbindir}/%{name} | |
48 | echo 'exec python %{_datadir}/%{name}/sbin/%{name}.pyc $*' \ | |
49 | >> $RPM_BUILD_ROOT%{_sbindir}/%{name} | |
50 | ||
51 | %clean | |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | ||
54 | %files | |
55 | %defattr(644,root,root,755) | |
56 | %doc htdocs/* etc/httpd | |
57 | %attr(755,root,root) %{_sbindir}/* | |
58 | %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name} | |
59 | %{_datadir}/%{name} | |
60 | %dir %attr(664,root,http) /var/*/%{name} |