Sophie

Sophie

distrib > Mandriva > 2008.0 > i586 > by-pkgid > b6bc81da5e98167143be910c0aa54a58 > files > 1

asterisk-rate-engine-0.5.4-2mdk.src.rpm

Summary:	Least cost routing for Asterisk, as well as CDR logging
Name:		asterisk-rate-engine
Version:	0.5.4
Release:	%mkrel 2
License:	GPL
Group:		System/Servers
URL:		http://www.trollphone.org/files/
Source0:	http://www.trollphone.org/files/rate-engine-%{version}.tar.bz2
Patch0:		rate-engine-0.5.4-mdk_conf.diff
Patch1:		rate-engine-0.5.4-asterisk_1.2_fix.diff
BuildRequires:	asterisk-devel >= 1.1
BuildRequires:	MySQL-devel
BuildRequires:	pcre-devel
BuildRequires:	openssl-devel
Requires:	asterisk >= 1.1
Buildroot:	%{_tmppath}/%{name}-%{version}

%description
Pre-release of Rate Engine -- a work in progress. This implements 
least cost routing for Asterisk, as well as CDR logging once a 
call is complete. 

%prep

%setup -q -n rate-engine-%{version}
%patch0 -p0
%patch1 -p0

# fix dir perms
find . -type d | xargs chmod 755
    
# fix file perms
find . -type f | xargs chmod 644

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

# lib64 fix
find -name "Makefile" | 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
install -d %{buildroot}%{_libdir}/asterisk

install -m0644 rate_engine.conf.sample %{buildroot}%{_sysconfdir}/asterisk/rate_engine.conf
install -m0755 rate_engine.so %{buildroot}%{_libdir}/asterisk/

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

%files
%defattr(-,root,root)
%doc COPYING COPYRIGHT ChangeLog DISCLAIMER NEWS README TODO schema-0.5.1-0.5.2.sql schema.sql
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/asterisk/rate_engine.conf
%attr(0755,root,root) %{_libdir}/asterisk/rate_engine.so

%changelog
* Sun Oct 30 2005 Oden Eriksson <oeriksson@mandriva.com> 0.5.4-2mdk
- rebuilt against MySQL-5.0.15
- added P1 to make it build

* Sun Apr 10 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.5.4-1mdk
- initial package