added extra/gnu-netcat

fixes #1013
This commit is contained in:
Kevin Mihelich 2014-11-05 02:41:14 +00:00
parent f544e1c56c
commit 05ebc14392
3 changed files with 72 additions and 0 deletions

37
extra/gnu-netcat/PKGBUILD Normal file
View file

@ -0,0 +1,37 @@
# $Id$
# Maintainer: Tom K <tomk@runbox.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch for ARM fix (http://sourceforge.net/p/netcat/bugs/23/)
pkgname=gnu-netcat
pkgver=0.7.1
pkgrel=5.1
pkgdesc="GNU rewrite of netcat, the network piping application"
depends=('glibc' 'texinfo')
arch=('i686' 'x86_64')
url="http://netcat.sourceforge.net/"
license=('GPL')
replaces=('netcat')
provides=('netcat')
install=gnu-netcat.install
source=("http://downloads.sourceforge.net/sourceforge/netcat/netcat-$pkgver.tar.bz2"
'gnu-netcat-flagcount.patch')
md5sums=('0a29eff1736ddb5effd0b1ec1f6fe0ef'
'fccdd10bf84b18ba4e1d9ef2677e038c')
prepare() {
cd "${srcdir}/netcat-${pkgver}"
patch -p1 -i ../gnu-netcat-flagcount.patch
}
build() {
cd "${srcdir}/netcat-${pkgver}"
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
make
}
package() {
cd "${srcdir}/netcat-${pkgver}"
make DESTDIR="${pkgdir}" install
}

View file

@ -0,0 +1,22 @@
--- a/src/flagset.c
+++ b/src/flagset.c
@@ -134,7 +134,7 @@
int netcat_flag_count(void)
{
- register char c;
+ register unsigned char c;
register int i;
int ret = 0;
@@ -154,8 +154,8 @@
Assumed that the bit number 1 is the sign, and that we will shift the
bit 1 (or the bit that takes its place later) until the the most right,
WHY it has to keep the wrong sign? */
- ret -= (c >> 7);
- c <<= 1;
+ ret += (c & 1);
+ c >>= 1;
}
}

View file

@ -0,0 +1,13 @@
infodir=/usr/share/info
post_install() {
install-info $infodir/netcat.info.gz $infodir/dir 2> /dev/null
}
post_upgrade() {
post_install $1
}
pre_remove() {
install-info --delete $infodir/netcat.info.gz $infodir/dir 2> /dev/null
}