]> git.pld-linux.org Git - packages/davedap.git/blob - davedap.spec
727196b14be308c36a74c70fbf0b83eb4d9ada53
[packages/davedap.git] / davedap.spec
1 Summary:        DaveDAP's A Very Easy Directory Administration Program
2 Name:           davedap
3 Version:        0.8.2
4 Release:        1
5 License:        GPL v2
6 Group:          Applications/Databases
7 Source0:        http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
8 # Source0-md5:  55c6e4b2954f2319f2bebf1cb7700e64
9 Source1:        %{name}.conf
10 URL:            http://davedap.sourceforge.net/
11 Requires:       apache
12 Requires:       php-ldap
13 Requires:       php-xml
14 Requires(post,preun):   grep
15 Requires(preun):        fileutils
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define davedapdir      %{_datadir}/%{name}
19
20 %description
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.
25
26 %prep
27 %setup -q
28
29 %install
30 rm -rf $RPM_BUILD_ROOT
31 install -d $RPM_BUILD_ROOT{/etc/httpd,%{davedapdir}/{images,templates/creation}}
32
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/
36
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
40
41 %clean
42 rm -rf $RPM_BUILD_ROOT
43
44 %post
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
47 fi
48 if [ -f /var/lock/subsys/httpd ]; then
49         /usr/sbin/apachectl restart 1>&2
50 fi
51
52 %preun
53 if [ "$1" = "0" ]; then
54         umask 027
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
60         fi
61 fi
62
63 %files
64 %defattr(644,root,root,755)
65 # there's no README, INSTALL may contain usefull info
66 %doc FEATURES INSTALL TODO
67 %dir %{davedapdir}
68 %{davedapdir}/images
69 %{davedapdir}/templates
70 %{davedapdir}/*.php
71 %{davedapdir}/*.css
72 %{davedapdir}/*.txt
73 %config(noreplace) %verify(not mtime size md5) /etc/httpd/%{name}.conf
74 %config(noreplace) %verify(not mtime size md5) /etc/%{name}.conf
This page took 0.112634 seconds and 3 git commands to generate.