]> git.pld-linux.org Git - packages/davedap.git/blame - davedap.spec
- what about handling config like that?
[packages/davedap.git] / davedap.spec
CommitLineData
36424755
TO
1Summary: DaveDAP's A Very Easy Directory Administration Program
2Name: davedap
3Version: 0.8.1
4Release: 1
5License: GPL v2
6Group: Applications/Databases
7Source0: http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
8# Source0-md5: f7756e7a8201725ed7dff72968078a8e
9Source1: %{name}.conf
10URL: http://davedap.sourceforge.net/
11Requires: apache
12Requires: php-ldap
13Requires: php-xml
14Requires(post,preun): grep
15Requires(preun): fileutils
16BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18%define davedapdir %{_datadir}/%{name}
19
20%description
21DaveDAP is a web-based LDAP admin tool written in PHP. You can browse
22your LDAP tree, create, delete, edit, and copy objects, perform
23searches, and view your server's schema. You can even copy objects
24between two LDAP servers and recursively delete or copy entire trees.
25
26%prep
27%setup -q
28
29%install
30rm -rf $RPM_BUILD_ROOT
31install -d $RPM_BUILD_ROOT{/etc/httpd,%{davedapdir}/{images,include}}
32
f8d492e8 33install *.php *.css *.txt $RPM_BUILD_ROOT%{davedapdir}/
36424755
TO
34install images/* $RPM_BUILD_ROOT%{davedapdir}/images/
35
36install %SOURCE1 $RPM_BUILD_ROOT/etc/httpd/
f8d492e8
TO
37install config.php.example $RPM_BUILD_ROOT/etc/davedap.conf
38ln -s /etc/davedap.conf $RPM_BUILD_ROOT%{davedapdir}/config.php
36424755
TO
39
40%clean
41rm -rf $RPM_BUILD_ROOT
42
43%post
44if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*davedap.conf" /etc/httpd/httpd.conf; then
45 echo "Include /etc/httpd/davedap.conf" >> /etc/httpd/httpd.conf
46fi
47if [ -f /var/lock/subsys/httpd ]; then
48 /usr/sbin/apachectl restart 1>&2
49fi
50
51%preun
52if [ "$1" = "0" ]; then
53 umask 027
54 grep -v "^Include.*davedap.conf" /etc/httpd/httpd.conf > \
55 /etc/httpd/httpd.conf.tmp
56 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
57 if [ -f /var/lock/subsys/httpd ]; then
58 /usr/sbin/apachectl restart 1>&2
59 fi
60fi
61
62%files
63%defattr(644,root,root,755)
64# there's no README, INSTALL may contain usefull info
65%doc INSTALL TODO
66%dir %{davedapdir}
67%{davedapdir}/images
68%{davedapdir}/*.php
69%{davedapdir}/*.css
70%{davedapdir}/*.txt
36424755 71%config(noreplace) %verify(not mtime size md5) /etc/httpd/%{name}.conf
f8d492e8 72%config(noreplace) %verify(not mtime size md5) /etc/%{name}.conf
This page took 0.081142 seconds and 4 git commands to generate.