From 3642475588e5dc13006373eb57b25d1174cc5e70 Mon Sep 17 00:00:00 2001 From: Tomek Orzechowski Date: Tue, 17 Jun 2003 09:51:47 +0000 Subject: [PATCH 1/1] - new Changed files: davedap.conf -> 1.1 davedap.spec -> 1.1 --- davedap.conf | 1 + davedap.spec | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 davedap.conf create mode 100644 davedap.spec diff --git a/davedap.conf b/davedap.conf new file mode 100644 index 0000000..1652611 --- /dev/null +++ b/davedap.conf @@ -0,0 +1 @@ +Alias /davedap /usr/share/davedap diff --git a/davedap.spec b/davedap.spec new file mode 100644 index 0000000..2673e64 --- /dev/null +++ b/davedap.spec @@ -0,0 +1,70 @@ +Summary: DaveDAP's A Very Easy Directory Administration Program +Name: davedap +Version: 0.8.1 +Release: 1 +License: GPL v2 +Group: Applications/Databases +Source0: http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +# Source0-md5: f7756e7a8201725ed7dff72968078a8e +Source1: %{name}.conf +URL: http://davedap.sourceforge.net/ +Requires: apache +Requires: php-ldap +Requires: php-xml +Requires(post,preun): grep +Requires(preun): fileutils +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%define davedapdir %{_datadir}/%{name} + +%description +DaveDAP is a web-based LDAP admin tool written in PHP. You can browse +your LDAP tree, create, delete, edit, and copy objects, perform +searches, and view your server's schema. You can even copy objects +between two LDAP servers and recursively delete or copy entire trees. + +%prep +%setup -q + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{/etc/httpd,%{davedapdir}/{images,include}} + +install *.php *.css *.txt *.example $RPM_BUILD_ROOT%{davedapdir}/ +install images/* $RPM_BUILD_ROOT%{davedapdir}/images/ + +install %SOURCE1 $RPM_BUILD_ROOT/etc/httpd/ + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*davedap.conf" /etc/httpd/httpd.conf; then + echo "Include /etc/httpd/davedap.conf" >> /etc/httpd/httpd.conf +fi +if [ -f /var/lock/subsys/httpd ]; then + /usr/sbin/apachectl restart 1>&2 +fi + +%preun +if [ "$1" = "0" ]; then + umask 027 + grep -v "^Include.*davedap.conf" /etc/httpd/httpd.conf > \ + /etc/httpd/httpd.conf.tmp + mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf + if [ -f /var/lock/subsys/httpd ]; then + /usr/sbin/apachectl restart 1>&2 + fi +fi + +%files +%defattr(644,root,root,755) +# there's no README, INSTALL may contain usefull info +%doc INSTALL TODO +%dir %{davedapdir} +%{davedapdir}/images +%{davedapdir}/*.php +%{davedapdir}/*.css +%{davedapdir}/*.txt +%{davedapdir}/*.example +%config(noreplace) %verify(not mtime size md5) /etc/httpd/%{name}.conf -- 2.44.0