Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > by-pkgid > 5ccfa416f57d6c23d5f42b5696b9a926 > files > 6

tptest-3.1.7-2mdk.src.rpm

%define	name	tptest
%define	version	3.1.7
%define	release	2mdk

Summary:	TPTEST - Network throughput measurement program
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL
Group:		System/Servers 
URL:		http://tptest.sourceforge.net/
Source0:	%{name}-%{version}.tar.bz2
Source1:	tptest-server.init.bz2
Source2:	tptest-masterserver.init.bz2
Patch0:		tptest-3.1.6-gcc33_fix.diff.bz2
Patch1:		tptest-3.1.6-denyfile_location.diff.bz2
PreReq:		rpm-helper
BuildRoot:	%{_tmppath}/%{name}-buildroot

%description
The purpose with TPTEST is to allow users to measure the speed
of their Internet connection in a simple way. TPTEST measures
the throughput speed to and from various reference servers on
the Internet. The use of TPTEST may help increase the
consumer/end user knowledge of how Internet services work. 
 
TPTEST was originally developed by the Swedish ICT-commission,
then later by the Foundation for Internet Infrastructure (iis.se),
the Swedish Consumer Agency (konsumentverket.se), and the Swedish
National Post- and Telecom Agency (pts.se). The latest development
has been to separate the platform-independent test method software
(the test engine) from the platform-dependent user interface
software in order to make it easier for anyone to write a test
client or server that uses the TPTEST testing method. The test
engine code is to be regarded as a library module and is released
under the LGPL license while the reference client/server
applications is released under the GPL license. 

%package 	server
Summary: 	TPTEST - Network throughput measurement server
Group: 		System/Servers
PreReq:		rpm-helper

%description 	server
The purpose with TPTEST is to allow users to measure the speed
of their Internet connection in a simple way. TPTEST measures
the throughput speed to and from various reference servers on
the Internet. The use of TPTEST may help increase the
consumer/end user knowledge of how Internet services work. 

This package provides the server part of tptest.

%package 	masterserver
Summary: 	TPTEST - Network throughput measurement masterserver
Group: 		System/Servers
PreReq:		rpm-helper
Conflicts:	tptest-server

%description 	masterserver
The purpose with TPTEST is to allow users to measure the speed
of their Internet connection in a simple way. TPTEST measures
the throughput speed to and from various reference servers on
the Internet. The use of TPTEST may help increase the
consumer/end user knowledge of how Internet services work. 

This package provides the master server part of tptest.

%prep

%setup -q -n %{name}-%{version}
%patch0 -p0
%patch1 -p0

echo "127.0.0.2" > tptestmaster.deny
echo "127.0.0.2" > tptest.deny

bzcat %{SOURCE1} > tptest-server.init
bzcat %{SOURCE2} > tptest-masterserver.init

%build

# build the client
make -C apps/unix/client CDEBUG="%{optflags}"

# build the server
make -C apps/unix/server CDEBUG="%{optflags}"

# build the master server
cp engine/tpcommon.h apps/unix/masterserver/
cp engine/tpcommon.c apps/unix/masterserver/
cp engine/tpio.h apps/unix/masterserver/
cp engine/tpengine.h apps/unix/masterserver/
make -C apps/unix/masterserver CDEBUG="%{optflags}"

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

# don't fiddle with the initscript!
export DONT_GPRINTIFY=1

install -d %{buildroot}%{_sbindir}
install -d %{buildroot}%{_initrddir}

install -m0755 apps/unix/client/tptestclient %{buildroot}%{_sbindir}/tptest
install -m0755 apps/unix/server/tptestserver %{buildroot}%{_sbindir}/tptest-server
install -m0755 apps/unix/masterserver/tptestmaster %{buildroot}%{_sbindir}/tptest-masterserver

install -m0644 apps/unix/server/tptest.conf %{buildroot}%{_sysconfdir}/tptest.conf
install -m0644 apps/unix/masterserver/tptest.servers %{buildroot}%{_sysconfdir}/tptest.servers
install -m0644 tptestmaster.deny %{buildroot}%{_sysconfdir}/
install -m0644 tptest.deny %{buildroot}%{_sysconfdir}/

install -m0755 tptest-server.init %{buildroot}%{_initrddir}/tptest-server
install -m0755 tptest-masterserver.init %{buildroot}%{_initrddir}/tptest-masterserver

%post server
%_post_service tptest-server

%preun server
%_preun_service tptest-server

%post masterserver
%_post_service tptest-masterserver

%preun masterserver
%_preun_service tptest-masterserver

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

%files
%defattr(-,root,root)
%doc engine/tptest3.txt
%{_sbindir}/tptest

%files server
%defattr(-,root,root)
%attr(0644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tptest.conf
%attr(0644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tptest.deny
%attr(0755,root,root) %config(noreplace) %{_initrddir}/tptest-server
%{_sbindir}/tptest-server

%files masterserver
%defattr(-,root,root)
%doc apps/unix/masterserver/tptest.servers.V2
%attr(0644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tptest.servers
%attr(0644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tptestmaster.deny
%attr(0755,root,root) %config(noreplace) %{_initrddir}/tptest-masterserver
%{_sbindir}/tptest-masterserver

%changelog
* Fri Sep 09 2005 Oden Eriksson <oeriksson@mandriva.com> 3.1.7-2mdk
- rebuild

* Mon Aug 23 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.1.7-1mdk
- 3.1.7

* Fri Jun 04 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.1.6-3mdk
- added the masterserver
- fixed nicer init scripts
- misc spec file fixes

* Tue Jun 01 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.1.6-2mdk
- fix one extremely silly bug in the sysv script...

* Sun May 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.1.6-1mdk
- 3.1.6
- misc spec file fixes

* Thu Jan 16 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.0.6-2mdk
- build release

* Mon Oct 21 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.0.6-1mdk
- initial cooker contrib