# define alphatag rc2 %define pre rc2 Name: netperf Version: 4.0.0 Release: 0.%{pre}.3%{?dist} Summary: Network benchmarking tools Group: Applications/Communications License: GPLv2+ with exceptions URL: http://www.netperf.org/ Source0: ftp://ftp.netperf.org/netperf/%{name}-%{version}%{pre}.tar.gz Patch0: netperf-4.0.0rc2-xmlcatalog.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libxml2-devel BuildRequires: glib2-devel BuildRequires: pkgconfig # need this for sctp tests, if we --enable-sctp #BuildRequires: lksctp-tools-devel BuildRequires: texinfo BuildRequires: texinfo-tex # libxml2 required because of usage of /usr/bin/xmlcatalog # but rpmlint nags, so checking if this gets pulled in #Requires(post): libxml2 #Requires(postun): libxml2 %description A benchmark that can be used to measure the performance of many different types of networking. It provides tests for both unidirecitonal throughput, and end-to-end latency. The environments currently measureable by netperf include: * TCP and UDP via BSD Sockets for both IPv4 and IPv6 * DLPI * Unix Domain Sockets * SCTP for both IPv4 and IPv6 %package devel Summary: Development headers for %{name} Group: Development/Libraries Requires: %{name} %description devel This package contains necessary header files for %{name} development. %prep %setup -q -n %{name}-%{version}%{?pre} %patch0 -p1 -b .xmlcatalog # documentation files should not be executable find doc -type f -exec chmod 0644 {} \; %build %configure --disable-static \ --enable-unixdomain \ --enable-dlpi \ --enable-xti \ --enable-exs sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_infodir}/dir # manually remove the static library # as --disable-static flag to ./configure only prevent .a but .la rm $RPM_BUILD_ROOT%{_libdir}/*.la # man and info pages in rc2 are 0 bytes, so disabling their inclusion for now rm $RPM_BUILD_ROOT%{_infodir}/netperf4.info* rm $RPM_BUILD_ROOT%{_mandir}/man1/netperf4.1* rm $RPM_BUILD_ROOT%{_mandir}/man1/netserver4.1* %clean rm -rf $RPM_BUILD_ROOT %post /sbin/ldconfig CATALOG=%{_sysconfdir}/xml/catalog %{_bindir}/xmlcatalog --noout --add "system" \ "http://www.netperf.org/netperf_docs.dtd/1.0" \ "file://%{_datadir}/%{name}/netperf_docs.dtd" $CATALOG # man and info pages in rc2 are 0 bytes, so disabling their inclusion for now #/sbin/install-info %{_infodir}/netperf4.info.gz %{_infodir}/dir # man and info pages in rc2 are 0 bytes, so disabling their inclusion for now #%preun #if [ $1 = 0 ]; then # /sbin/install-info --delete %{_infodir}/netperf4.info.gz %{_infodir}/dir #fi %postun /sbin/ldconfig # remove entries only on removal of package if [ "$1" = 0 ]; then CATALOG=%{_sysconfdir}/xml/catalog %{_bindir}/xmlcatalog --noout --del \ "file://%{_datadir}/%{name}/netperf_docs.dtd" $CATALOG fi %files %defattr(-,root,root,-) # note, 4.0.0rc2 has 0 length NEWS, so not including it %doc AUTHORS ChangeLog COPYING README README.* Release_Notes %doc doc/netperf4_design.txt doc/netperf4.texi doc/examples %{_bindir}/netperf %{_bindir}/netserver %{_libdir}/*.so* # man and info pages in rc2 are 0 bytes, so disabling their inclusion for now #%{_infodir}/netperf4.info.gz #%{_mandir}/man1/netperf4.1* #%{_mandir}/man1/netserver4.1* %{_datadir}/netperf/default_commands.xml %{_datadir}/netperf/default_config.xml %{_datadir}/netperf/netperf_docs.dtd %files devel %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING README README.* Release_Notes doc/netperf4_design.txt doc/netperf4.texi %{_bindir}/netperf-config %{_includedir}/netconfidence.h %{_includedir}/netperf.h %{_includedir}/netperf_hist.h %changelog * Fri Oct 16 2009 Patrick C. F. Ernzer 4.0.0-0.rc2.3 - man and info pages in rc2 are 0 bytes, so disabling their inclusion for now * Thu Oct 15 2009 Patrick C. F. Ernzer 4.0.0-0.rc2.2 - adding flags to configure so we have more tests built * Wed Oct 14 2009 Patrick C. F. Ernzer 4.0.0-0.rc2.1 - first build