summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD52
-rw-r--r--configure.patch11
-rw-r--r--makefile.patch11
4 files changed, 95 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..368036cab36a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = tcprstat-bzr
+ pkgdesc = A protocol-agnostic libpcap-based tool for measuring TCP response times
+ pkgver = 73
+ pkgrel = 1
+ url = https://launchpad.net/tcprstat
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = bzr
+ depends = libpcap
+ provides = tcprstat
+ conflicts = tcprstat
+ options = !libtool
+ options = !emptydirs
+ source = configure.patch
+ source = makefile.patch
+ md5sums = a0a259c1498927b0d14f94f7178ac910
+ md5sums = 7395c29d5937ee04e137a990adb5a054
+
+pkgname = tcprstat-bzr
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..047bcd47886b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Simon Perry <pezz [at] sanxion [dot] net>
+
+pkgname=tcprstat-bzr
+_pkgname=tcprstat
+pkgver=73
+pkgrel=1
+pkgdesc="A protocol-agnostic libpcap-based tool for measuring TCP response times"
+arch=('i686' 'x86_64')
+url="https://launchpad.net/tcprstat"
+license=('GPL')
+depends=('libpcap')
+makedepends=('bzr')
+provides=(${_pkgname})
+conflicts=(${_pkgname})
+options=('!libtool' '!emptydirs')
+source=(configure.patch makefile.patch)
+md5sums=('a0a259c1498927b0d14f94f7178ac910'
+ '7395c29d5937ee04e137a990adb5a054')
+
+_bzrtrunk="lp:${_pkgname}"
+_bzrmod="${_pkgname}"
+
+build() {
+ cd "${srcdir}"
+
+ msg "Connecting to the server...."
+
+ if [ -d ${_bzrmod} ]; then
+ bzr up ${_bzrmod} -r ${pkgver}
+ msg "The local files are updated."
+ else
+ bzr co ${_bzrtrunk} ${_bzrmod} -r ${pkgver}
+ fi
+
+ msg "bzr checkout done or server timeout"
+ msg "Starting make..."
+
+ rm -rf "${_bzrmod}-build"
+ cp -r "${_bzrmod}" "${_bzrmod}-build"
+ chmod 700 "${_bzrmod}-build/bootstrap"
+ cd "${_bzrmod}-build"
+
+ patch -Np1 -i $srcdir/configure.patch
+ patch -Np1 -i $srcdir/makefile.patch
+
+ ./bootstrap
+ ./configure --prefix=/usr --disable-static
+
+ make
+ make DESTDIR=$pkgdir install
+}
+# vim: ts=2 sw=2 et:
diff --git a/configure.patch b/configure.patch
new file mode 100644
index 000000000000..9aa40c6ab102
--- /dev/null
+++ b/configure.patch
@@ -0,0 +1,11 @@
+--- tcprstat-build/configure.ac 2011-11-13 00:38:58.004882000 +1100
++++ tcprstat-build/configure.ac 2011-11-13 00:53:34.714854119 +1100
+@@ -43,7 +43,7 @@
+ # Checks for header files.
+ AC_CHECK_HEADERS(
+ [arpa/inet.h netinet/in.h stdint.h stdlib.h string.h sys/time.h unistd.h])
+-AC_CHECK_HEADER([pcap/sll.h], , [buildpcap=yes])
++AC_CHECK_HEADER([pcap/sll.h], [buildpcap=no], [buildpcap=yes])
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_TYPE_UINT16_T
diff --git a/makefile.patch b/makefile.patch
new file mode 100644
index 000000000000..3a25121cb2b8
--- /dev/null
+++ b/makefile.patch
@@ -0,0 +1,11 @@
+--- tcprstat-build/src/Makefile.am 2011-11-13 00:38:58.004882000 +1100
++++ tcprstat-build/src/Makefile.am 2011-11-13 01:08:56.987127799 +1100
+@@ -20,7 +20,7 @@
+
+ AM_CFLAGS = -Wall -Werror -g
+
+-bin_PROGRAMS = tcprstat tcprstat-static
++bin_PROGRAMS = tcprstat
+ tcprstat_SOURCES = tcprstat.h tcprstat.c functions.h functions.c capture.h \
+ capture.c process-packet.h process-packet.c local-addresses.h \
+ local-addresses.c stats.h stats.c output.h output.c stats-hash.h \