[arch-commits] Commit in netbrake/repos (3 files)

Felix Yan felixonmars at archlinux.org
Tue Jul 7 16:55:10 UTC 2020


    Date: Tuesday, July 7, 2020 @ 16:55:10
  Author: felixonmars
Revision: 659478

archrelease: copy trunk to community-staging-x86_64

Added:
  netbrake/repos/community-staging-x86_64/
  netbrake/repos/community-staging-x86_64/PKGBUILD
    (from rev 659477, netbrake/trunk/PKGBUILD)
  netbrake/repos/community-staging-x86_64/arch-x86_64.patch
    (from rev 659477, netbrake/trunk/arch-x86_64.patch)

-------------------+
 PKGBUILD          |   42 ++++++++++++++++++++++++++++++++++++++++++
 arch-x86_64.patch |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)

Copied: netbrake/repos/community-staging-x86_64/PKGBUILD (from rev 659477, netbrake/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-07-07 16:55:10 UTC (rev 659478)
@@ -0,0 +1,42 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Zsolt Varadi <sysop_xxl at fibermail.hu>
+
+pkgname=netbrake
+pkgver=0.2
+pkgrel=7
+pkgdesc="Netbrake is an utility to limit the bandwidth used by a process"
+arch=(x86_64)
+url="http://www.hping.org/netbrake/"
+license=('GPL')
+depends=(glibc)
+makedepends=()
+source=($url/$pkgname-$pkgver.tar.gz
+	arch-x86_64.patch)
+sha512sums=('be19e7a85a10060874048cfce2715fa0766f477f584ba958fcee05737302f21ed658660f62d55c844440fa61e99689bcf3c3a6454638f11f0e68d52cd850fde5'
+            '74067212147f05a36d59549cf90d4639e8e9f85393c8e2062438b62eb84fb5fd6a72a79edbb452aac20aa8d6742edc45f60c5314b49830ccfcf0ac9ae18cacfa')
+
+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
+}
+
+package() {
+  cd "$srcdir"/$pkgname
+
+  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
+}

Copied: netbrake/repos/community-staging-x86_64/arch-x86_64.patch (from rev 659477, netbrake/trunk/arch-x86_64.patch)
===================================================================
--- community-staging-x86_64/arch-x86_64.patch	                        (rev 0)
+++ community-staging-x86_64/arch-x86_64.patch	2020-07-07 16:55:10 UTC (rev 659478)
@@ -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;


More information about the arch-commits mailing list