]> git.pld-linux.org Git - packages/web2ldap.git/blob - web2ldap.spec
- fcgi/scgi scripts made more usable (*.py files installed as executable)
[packages/web2ldap.git] / web2ldap.spec
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 pylib sbin fcgi scgi; 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}/htdocs} \
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 cp -R htdocs/css $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs
47 find $RPM_BUILD_ROOT%{_datadir}/%{name}/pylib -name "*.py" | xargs rm
48 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/sbin/compile*
49 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/sbin/*.py
50 echo '#!/bin/sh' > $RPM_BUILD_ROOT%{_sbindir}/%{name}
51 echo 'exec python %{_datadir}/%{name}/sbin/%{name}.pyc $*' \
52         >> $RPM_BUILD_ROOT%{_sbindir}/%{name}
53
54 %clean
55 rm -rf $RPM_BUILD_ROOT
56
57 %files
58 %defattr(644,root,root,755)
59 %doc htdocs/* etc/httpd
60 %attr(755,root,root) %{_sbindir}/*
61 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}
62
63 %dir %{_datadir}/%{name}
64 %{_datadir}/%{name}/pylib
65 %{_datadir}/%{name}/htdocs
66 %{_datadir}/%{name}/sbin
67 %{_datadir}/%{name}/templates
68
69 %dir %{_datadir}/%{name}/fcgi
70 %attr(755,root,root) %{_datadir}/%{name}/fcgi/web2ldap.py
71 %{_datadir}/%{name}/fcgi/*.py[co]
72
73 %dir %{_datadir}/%{name}/scgi
74 %attr(755,root,root) %{_datadir}/%{name}/scgi/web2ldap.py
75 %{_datadir}/%{name}/scgi/*.py[co]
76
77 %dir %attr(664,root,http) /var/*/%{name}
This page took 0.072421 seconds and 4 git commands to generate.