Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > 6972e2dff57c0b145981c3a13cb7bbdd > files > 4

asterisk-app_icd-1.0.0-0.20050501.1mdk.src.rpm

%define snap 20050501
Summary:	ICD  - Intelligent Call Distributor system
Name:		asterisk-app_icd
Version:	1.0.0
Release:	%mkrel 0.%{snap}.1
License:	GPL
Group:		System/Servers
URL:		http://icd.sourceforge.net/
Source0:	http://prdownloads.sourceforge.net/icd/app_icd-%{version}-%{snap}.tar.bz2
Patch0:		app_icd-1.0.0-20050501-mdk_conf.diff.bz2
Patch1:		app_icd-1.0.0-20050501-icd_bridge_fix.diff.bz2
BuildRequires:	sqlite3-devel
BuildRequires:	asterisk-devel
Requires:	asterisk
Buildroot:	%{_tmppath}/%{name}-%{version}

%description
ICD is the Intelligent Call Distributor system. Originally a
module designed for the Asterisk PBX, it is being developed for
use with several other open source PBXs.
 
ICD provides any number of methods for you to link up internal
call endpoints, whether agents or other systems, to external
endpoints, whether customers or other systems. That is a very
abstract view. For most uses, it provides a way of bridging a
customer to an agent using almost any strategy you can imagine.
Want to hook ICD up to a predictive dialer? No problem. Want to
provide a customer callback function when an agent comes
available? Easy to do. Want to have customers directed to specific
queues of agents based on skillsets? Again, this can be done with
ICD.

%prep

%setup -q -n app_icd-%{version}-%{snap}
%patch0 -p1
%patch1 -p0


find . -type d -perm 0700 -exec chmod 755 {} \;
find . -type f -perm 0555 -exec chmod 755 {} \;
find . -type f -perm 0444 -exec chmod 644 {} \;

for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
    if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null
done

# lib64 fix
find . -type f | xargs perl -pi -e "s|/usr/lib|%{_libdir}|g"

%build

%make \
    RPM_OPT_FLAGS="%{optflags} -pipe -Wall -fPIC -DPIC -D_REENTRANT -D_GNU_SOURCE"

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_sysconfdir}/asterisk/icd_config
install -d %{buildroot}%{_libdir}/asterisk

install -m0644 icd_config/icd.conf %{buildroot}%{_sysconfdir}/asterisk/icd_config/
install -m0644 icd_config/icd_agents.conf %{buildroot}%{_sysconfdir}/asterisk/icd_config/
install -m0644 icd_config/icd_conference.conf %{buildroot}%{_sysconfdir}/asterisk/icd_config/
install -m0644 icd_config/icd_queues.conf %{buildroot}%{_sysconfdir}/asterisk/icd_config/
install -m0755 app_icd.so %{buildroot}%{_libdir}/asterisk/

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc BUGS README README.memory caller_states.txt modules.txt static_pluggable.txt
%doc icd_config/extensions.conf.sample test
%attr(0755,root,root) %dir %{_sysconfdir}/asterisk/icd_config
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/asterisk/icd_config/icd.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/asterisk/icd_config/icd_agents.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/asterisk/icd_config/icd_conference.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/asterisk/icd_config/icd_queues.conf
%attr(0755,root,root) %{_libdir}/asterisk/app_icd.so

%changelog
* Sun May 01 2005 Oden Eriksson <oeriksson@mandriva.com> 1.0.0-0.20050501.1mdk
- initial Mandriva package