Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > media > contrib-src > by-pkgid > 45c3489c4efbc187fbf01f753cf3e6cb > files > 3

ndk-1.1-1mdk.src.rpm

%define _localstatedir %{_var}/run/slapd

Summary: NetMeeting Directory Kit
Name: ndk
Version: 1.1
Release: 1mdk
License: GPL
Group: System/Servers
Source: http://ars.freesoft.org/software/NetMeeting/download/%{name}-%{version}.tar.bz2
URL: http://ars.freesoft.org/software/NetMeeting/index.html
BuildArchitectures: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Patch0: %{name}.patch.bz2
Requires: openldap-servers
Requires: perl-Convert-ASN1, perl-ldap
PreReq: /usr/bin/perl

%description
Each NetMeeting client can register with an LDAP server and has a directory
window that lists other NetMeeting clients registered with the same server.
The NetMeeting directory kit is an extension to the OpenLDAP server
that provides directory service to NetMeeting clients. 
%prep
rm -rf $RPM_BUILD_ROOT

%setup -q -n %{name}-%{version}
%patch0 -p1

%build

%install

%makeinstall \
	destdir=$RPM_BUILD_ROOT

install -m 644 slapd.netmeeting.conf $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/

install -d $RPM_BUILD_ROOT/%{_localstatedir}

%clean
rm -rf $RPM_BUILD_ROOT

%post
if [ -f %{_sysconfdir}/openldap/slapd.conf ] ;then
	if ! grep -q "^[[:alpha:]].*netmeeting" /etc/openldap/slapd.conf; then
sed -e '/^[[:alpha:]].*slapd.access.conf/{
i\
include /etc/openldap/slapd.netmeeting.conf
} ' /etc/openldap/slapd.conf > /etc/openldap/slapd.conf.$$
[ -s /etc/openldap/slapd.conf.$$ ] && mv -f /etc/openldap/slapd.conf.$$ /etc/openldap/slapd.conf
fi

%_post_service ldap

fi
%_post_service ldap2

%preun
%_preun_service ldap2
if [ -f %{_sysconfdir}/openldap/slapd.conf ] ;then
	if grep -q "slapd.netmeeting.conf" /etc/openldap/slapd.conf; then
		perl -pi -e 's!^.*slapd.netmeeting.conf.*$!!' /etc/openldap/slapd.conf
	fi
fi

%files
%defattr(-,root,root)
%doc
%attr(640,root,ldap) %config(noreplace) %{_sysconfdir}/openldap/slapd.netmeeting.conf
%attr(640,root,ldap) %config(noreplace) %{_sysconfdir}/openldap/slapd2.conf
%{_datadir}/openldap/schema/netmeeting.schema
%attr(770,root,ldap) /var/lib/ldap-netmeeting
%{_sbindir}/*
%config(noreplace) %{_sysconfdir}/init.d/ldap2
%config(noreplace) %{_sysconfdir}/sysconfig/ldap-ndk
%attr(-,ldap,ldap) %dir %{_localstatedir}

%changelog
* Mon Sep 03 2001 Philippe Libat <philippe@mandrakesoft.com> 1.1-1mdk
- first spec file