summaryrefslogtreecommitdiff
path: root/net/nbtscan
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2009-01-25 14:21:13 +0000
committerobache <obache@pkgsrc.org>2009-01-25 14:21:13 +0000
commit5a5417ca0cd1dfdc52db6facfe9815a2ce859a7a (patch)
tree7907ec03fe2cbb1875df737510a70bcdf1fa1f07 /net/nbtscan
parent7407fb7e5bd262e159bc7672b5b69466c847837a (diff)
downloadpkgsrc-5a5417ca0cd1dfdc52db6facfe9815a2ce859a7a.tar.gz
Fix off by one error, noticed by PR 40374.
Bump PKGREVISION. As Debian bug #418655, it is already reported to upstream: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;bug=418655 While here, add DESTDIR support.
Diffstat (limited to 'net/nbtscan')
-rw-r--r--net/nbtscan/Makefile12
-rw-r--r--net/nbtscan/distinfo3
-rw-r--r--net/nbtscan/patches/patch-ac24
3 files changed, 33 insertions, 6 deletions
diff --git a/net/nbtscan/Makefile b/net/nbtscan/Makefile
index 76477dbea00..656fa4728d0 100644
--- a/net/nbtscan/Makefile
+++ b/net/nbtscan/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.12 2009/01/25 13:40:27 obache Exp $
+# $NetBSD: Makefile,v 1.13 2009/01/25 14:21:13 obache Exp $
#
DISTNAME= nbtscan-1.5.1
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.inetcat.net/software/
@@ -9,16 +10,17 @@ MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.inetcat.net/software/nbtscan.html
COMMENT= NetBIOS name network scanner
+PKG_DESTDIR_SUPPORT= user-destdir
+
GNU_CONFIGURE= yes
WRKSRC= ${WRKDIR}/${DISTNAME}a
BUILD_TARGET= nbtscan
-INSTALLATION_DIRS= bin
+INSTALLATION_DIRS= bin share/doc/nbtscan
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/nbtscan ${PREFIX}/bin
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nbtscan
- ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/nbtscan
+ ${INSTALL_PROGRAM} ${WRKSRC}/nbtscan ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/nbtscan
.include "../../mk/bsd.pkg.mk"
diff --git a/net/nbtscan/distinfo b/net/nbtscan/distinfo
index fb7661a2909..335dbec615d 100644
--- a/net/nbtscan/distinfo
+++ b/net/nbtscan/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.6 2005/02/24 12:13:54 agc Exp $
+$NetBSD: distinfo,v 1.7 2009/01/25 14:21:13 obache Exp $
SHA1 (nbtscan-1.5.1.tar.gz) = 4041d8f6b592fa310b8d3c79c56a2d3263dba82f
RMD160 (nbtscan-1.5.1.tar.gz) = 5130d9e6decd3346859281f45f8a179aa0286a42
Size (nbtscan-1.5.1.tar.gz) = 82107 bytes
+SHA1 (patch-ac) = 93ea55a27cb434de567033acd883da08e7225646
diff --git a/net/nbtscan/patches/patch-ac b/net/nbtscan/patches/patch-ac
new file mode 100644
index 00000000000..61514865550
--- /dev/null
+++ b/net/nbtscan/patches/patch-ac
@@ -0,0 +1,24 @@
+$NetBSD: patch-ac,v 1.1 2009/01/25 14:21:13 obache Exp $
+
+Fix off by one error.
+
+--- nbtscan.c.orig 2003-06-06 12:14:00.000000000 +0000
++++ nbtscan.c
+@@ -111,7 +111,7 @@ int d_print_hostinfo(struct in_addr addr
+ for(i=0; i< hostinfo->header->number_of_names; i++) {
+ service = hostinfo->names[i].ascii_name[15];
+ strncpy(name, hostinfo->names[i].ascii_name, 15);
+- name[16]=0;
++ name[15]=0;
+ printf("%-17s Service: 0x%02x Flags: 0x%04x\n", name, service, hostinfo->names[i].rr_flags);
+ }
+ };
+@@ -164,7 +164,7 @@ int v_print_hostinfo(struct in_addr addr
+ for(i=0; i< hostinfo->header->number_of_names; i++) {
+ service = hostinfo->names[i].ascii_name[15];
+ strncpy(name, hostinfo->names[i].ascii_name, 15);
+- name[16]=0;
++ name[15]=0;
+ unique = !(hostinfo->names[i].rr_flags & 0x0080);
+ if(sf) {
+ printf("%s%s%s%s", inet_ntoa(addr), sf, name, sf);