1 Summary: DaveDAP's A Very Easy Directory Administration Program
6 Group: Applications/Databases
7 Source0: http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
8 # Source0-md5: 55c6e4b2954f2319f2bebf1cb7700e64
10 URL: http://davedap.sourceforge.net/
14 Requires(post,preun): grep
15 Requires(preun): fileutils
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define davedapdir %{_datadir}/%{name}
21 DaveDAP is a web-based LDAP admin tool written in PHP. You can browse
22 your LDAP tree, create, delete, edit, and copy objects, perform
23 searches, and view your server's schema. You can even copy objects
24 between two LDAP servers and recursively delete or copy entire trees.
30 rm -rf $RPM_BUILD_ROOT
31 install -d $RPM_BUILD_ROOT{/etc/httpd,%{davedapdir}/{images,templates/creation}}
33 install *.php *.css *.txt $RPM_BUILD_ROOT%{davedapdir}/
34 install images/* $RPM_BUILD_ROOT%{davedapdir}/images/
35 install templates/creation/*.php $RPM_BUILD_ROOT%{davedapdir}/templates/creation/
37 install %SOURCE1 $RPM_BUILD_ROOT/etc/httpd/
38 install config.php.example $RPM_BUILD_ROOT/etc/davedap.conf
39 ln -s /etc/davedap.conf $RPM_BUILD_ROOT%{davedapdir}/config.php
42 rm -rf $RPM_BUILD_ROOT
45 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*davedap.conf" /etc/httpd/httpd.conf; then
46 echo "Include /etc/httpd/davedap.conf" >> /etc/httpd/httpd.conf
48 if [ -f /var/lock/subsys/httpd ]; then
49 /usr/sbin/apachectl restart 1>&2
53 if [ "$1" = "0" ]; then
55 grep -v "^Include.*davedap.conf" /etc/httpd/httpd.conf > \
56 /etc/httpd/httpd.conf.tmp
57 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
58 if [ -f /var/lock/subsys/httpd ]; then
59 /usr/sbin/apachectl restart 1>&2
64 %defattr(644,root,root,755)
65 # there's no README, INSTALL may contain usefull info
66 %doc FEATURES INSTALL TODO
69 %{davedapdir}/templates
73 %config(noreplace) %verify(not mtime size md5) /etc/httpd/%{name}.conf
74 %config(noreplace) %verify(not mtime size md5) /etc/%{name}.conf