Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > c6586d6c873e95e64b93794f0d4b8302 > files > 2

asterisk-app_distributor-0.1-1mdk.src.rpm

Summary:	app_distributor module for the Asterisk PBX
Name:		asterisk-app_distributor
Version:	0.1
Release:	%mkrel 1
License:	GPL
Group:		System/Servers
URL:		http://www.pbxfreeware.org/
Source0:	http://www.pbxfreeware.org/app_distributor.c.bz2
BuildRequires:	asterisk-devel
Requires:	asterisk
Buildroot:	%{_tmppath}/%{name}-%{version}

%description
This application can be used to distribute calls between multiple
targets and can be used for load ballancing.

%prep

%setup -q -T -c %{name}-%{version}
bzcat %{SOURCE0} > app_distributor.c

cat > Makefile << EOF

CFLAGS+=-Wall -D_REENTRANT -D_GNU_SOURCE -fPIC
CC=gcc

all: app_distributor.so

clean:
	rm -f *.so *.o

%.so : %.o
	\$(CC) \$(CFLAGS) -shared -Xlinker -x -o \$@ \$<

app_distributor.so: app_distributor.o
	\$(CC) \$(CFLAGS) -shared -Xlinker -x -o \$@ app_distributor.o -lc
EOF

%build

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

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

install -d %{buildroot}%{_libdir}/asterisk
install -m0755 app_distributor.so %{buildroot}%{_libdir}/asterisk/

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

%files
%defattr(-,root,root)
%attr(0755,root,root) %{_libdir}/asterisk/app_distributor.so

%changelog
* Sun Feb 19 2006 Oden Eriksson <oeriksson@mandriva.com> 0.1-1mdk
- initial Mandriva package