diff options
author | root <root@rshg054.dnsready.net> | 2013-07-19 01:10:32 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-07-19 01:10:32 -0700 |
commit | 8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch) | |
tree | 03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/netbrake | |
parent | e445a313723389ba9ee1fded025c567dae5b21ea (diff) |
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/netbrake')
-rw-r--r-- | community/netbrake/PKGBUILD | 39 | ||||
-rw-r--r-- | community/netbrake/arch-x86_64.patch | 39 |
2 files changed, 78 insertions, 0 deletions
diff --git a/community/netbrake/PKGBUILD b/community/netbrake/PKGBUILD new file mode 100644 index 000000000..3eb1bf9cd --- /dev/null +++ b/community/netbrake/PKGBUILD @@ -0,0 +1,39 @@ +# $Id: PKGBUILD 66250 2012-02-23 05:21:40Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Zsolt Varadi <sysop_xxl@fibermail.hu> + +pkgname=netbrake +pkgver=0.2 +pkgrel=4 +pkgdesc="Netbrake is an utility to limit the bandwidth used by a process" +arch=(i686 x86_64) +url="http://www.hping.org/netbrake/" +license=('GPL') +depends=(glibc) +makedepends=() +source=($url/$pkgname-$pkgver.tar.gz + arch-x86_64.patch) +md5sums=('42f61481cdb910bddd1105d48367bdd2' + 'fe9de3428ff2a2ec8766d1b2bf8acfb5') + +build() { + cd $srcdir/$pkgname + + [ $CARCH == "x86_64" ] && patch -Np1 <../arch-x86_64.patch + + cp Makefile.in Makefile + sed -i -e 's|LIBPATH=@LIBPATH@|LIBPATH=/usr/lib|g' Makefile + sed -i -e 's|BINPATH=@BINPATH@|BINPATH=/usr/bin|g' Makefile + sed -i -e 's|COMPILE_TIME=@COMPILE_TIME@|COMPILE_TIME=-DNB_HTTPFS|g' Makefile + + cp netbrake.h.in netbrake.h + sed -i -e 's|#define LIBPATH "@LIBPATH@"|#define LIBPATH "/usr/lib"|g' netbrake.h + + make + + mkdir -p $pkgdir/usr/bin + mkdir -p $pkgdir/usr/lib + + install -m 755 netbrake $pkgdir/usr/bin + install -m 755 libnetbrake.so.0.1 $pkgdir/usr/lib +} diff --git a/community/netbrake/arch-x86_64.patch b/community/netbrake/arch-x86_64.patch new file mode 100644 index 000000000..327ffca84 --- /dev/null +++ b/community/netbrake/arch-x86_64.patch @@ -0,0 +1,39 @@ +diff -wbBur netbrake/libnetbrake.c netbrake.my/libnetbrake.c +--- netbrake/libnetbrake.c 2003-12-04 09:33:00.000000000 +0300 ++++ netbrake.my/libnetbrake.c 2007-10-11 13:29:22.000000000 +0400 +@@ -236,7 +236,7 @@ + return retval; + } + +-int recv(int s, void *buf, size_t len, int flags) ++ssize_t recv(int s, void *buf, size_t len, int flags) + { + int retval; + +@@ -245,7 +245,7 @@ + return retval; + } + +-int recvfrom(int s, void *buf, size_t len, int flags, ++ssize_t recvfrom(int s, void *buf, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlen) + { + int retval; +@@ -255,7 +255,7 @@ + return retval; + } + +-int send(int s, const void *msg, size_t len , int flags) ++ssize_t send(int s, const void *msg, size_t len , int flags) + { + int retval; + +@@ -264,7 +264,7 @@ + return retval; + } + +-int sendto(int s, const void *msg, size_t len, int flags, ++ssize_t sendto(int s, const void *msg, size_t len, int flags, + const struct sockaddr *to, socklen_t tolen) + { + int retval; |