]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - webapps | |
3 | Summary: DaveDAP's A Very Easy Directory Administration Program | |
4 | Summary(pl.UTF-8): DaveDAP - bardzo prosty program do administrowania katalogami | |
5 | Name: davedap | |
6 | Version: 0.8.4 | |
7 | Release: 2 | |
8 | License: GPL v2 | |
9 | Group: Applications/Databases | |
10 | Source0: http://dl.sourceforge.net/davedap/%{name}-%{version}.tar.gz | |
11 | # Source0-md5: 99abc5001ffe43dd8e9a26e19ac5c5f2 | |
12 | Source1: %{name}.conf | |
13 | URL: http://davedap.sourceforge.net/ | |
14 | Requires(post,preun): grep | |
15 | Requires(preun): fileutils | |
16 | Requires: php(ldap) | |
17 | Requires: php(xml) | |
18 | Requires: webserver = apache | |
19 | Requires: webserver(php) | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %define davedapdir %{_datadir}/%{name} | |
23 | ||
24 | %description | |
25 | DaveDAP is a web-based LDAP admin tool written in PHP. You can browse | |
26 | your LDAP tree, create, delete, edit, and copy objects, perform | |
27 | searches, and view your server's schema. You can even copy objects | |
28 | between two LDAP servers and recursively delete or copy entire trees. | |
29 | ||
30 | %description -l pl.UTF-8 | |
31 | DaveDAP to oparte na WWW narzędzie administracyjne do LDAP napisane w | |
32 | PHP. Pozwala przeglądać drzewo LDAP, tworzyć, usuwać, modyfikować i | |
33 | kopiować obiekty, wyszukiwać i oglądać schematy serwera. Można też | |
34 | kopiować obiekty między dwoma serwerami LDAP i rekurencyjnie usuwać | |
35 | lub kopiować całe drzewa. | |
36 | ||
37 | %prep | |
38 | %setup -q -n %{name} | |
39 | ||
40 | %install | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | install -d $RPM_BUILD_ROOT{/etc/httpd,%{davedapdir}/{images,templates/creation}} | |
43 | ||
44 | install *.php *.css *.txt *.js $RPM_BUILD_ROOT%{davedapdir}/ | |
45 | install images/*.png $RPM_BUILD_ROOT%{davedapdir}/images/ | |
46 | install templates/creation/*.php $RPM_BUILD_ROOT%{davedapdir}/templates/creation/ | |
47 | ||
48 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd | |
49 | install config.php.example $RPM_BUILD_ROOT%{_sysconfdir}/davedap.conf | |
50 | ln -s /etc/davedap.conf $RPM_BUILD_ROOT%{davedapdir}/config.php | |
51 | ||
52 | %clean | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %post | |
56 | if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*davedap.conf" /etc/httpd/httpd.conf; then | |
57 | echo "Include /etc/httpd/davedap.conf" >> /etc/httpd/httpd.conf | |
58 | fi | |
59 | if [ -f /var/lock/subsys/httpd ]; then | |
60 | /usr/sbin/apachectl restart 1>&2 | |
61 | fi | |
62 | ||
63 | %preun | |
64 | if [ "$1" = "0" ]; then | |
65 | umask 027 | |
66 | grep -v "^Include.*davedap.conf" /etc/httpd/httpd.conf > \ | |
67 | /etc/httpd/httpd.conf.tmp | |
68 | mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf | |
69 | if [ -f /var/lock/subsys/httpd ]; then | |
70 | /usr/sbin/apachectl restart 1>&2 | |
71 | fi | |
72 | fi | |
73 | ||
74 | %files | |
75 | %defattr(644,root,root,755) | |
76 | # there's no README, INSTALL may contain usefull info | |
77 | %doc INSTALL | |
78 | %dir %{davedapdir} | |
79 | %{davedapdir}/images | |
80 | %{davedapdir}/templates | |
81 | %{davedapdir}/*.php | |
82 | %{davedapdir}/*.js | |
83 | %{davedapdir}/*.css | |
84 | %{davedapdir}/*.txt | |
85 | %config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf | |
86 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf |