Subject: pkg/23440: new package: sysutils/copytape
To: None <gnats-bugs@gnats.netbsd.org>
From: None <eric@cirr.com>
List: netbsd-bugs
Date: 11/14/2003 12:30:58
>Number: 23440
>Category: pkg
>Synopsis: new package: sysutils/copytape
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Nov 14 18:32:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Eric Schnoebelen
>Release: NetBSD 1.6_STABLE
>Organization:
Central Iowa (Model) Railroad, Plano, TX US
>Environment:
System: NetBSD slurpee.cirr.com 1.6_STABLE NetBSD 1.6_STABLE (SLURPEE) #0: Tue Oct 22 19:36:55 CDT 2002 root@slurpee.cirr.com:/usr/src/sys/arch/alpha/compile/SLURPEE alpha
Architecture: alpha
Machine: alpha
>Description:
I've written up a new package for the copytape utility posted to
volume 10 of comp.sources.unix. It's purpose in life is to make
the duplication of magnetic tapes easier. (down right simple)
>How-To-Repeat:
duplicate a tape?
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# DESCR
# Makefile
# PLIST
# distinfo
# patches
# patches/patch-aa
# patches/patch-ab
#
echo x - DESCR
sed 's/^X//' >DESCR << 'END-of-DESCR'
XCopytape duplicates magtapes. It is intended for duplication of
Xbootable or other non-file-structured (non-tar-structured) magtapes
Xon systems with only one tape drive. Copytape is blissfully ignorant
Xof tape formats. It merely makes a bit-for-bit copy of its input.
END-of-DESCR
echo x - Makefile
sed 's/^X//' >Makefile << 'END-of-Makefile'
X# $NetBSD$
X# FreeBSD Id: ports/sysutils/copytape/Makefile,v 1.10 2003/02/20 19:00:46 knu Exp
X
XDISTNAME= copytape
XPKGNAME= copytape-1.0
XWRKSRC= ${WRKDIR}
XCATEGORIES= sysutils
XMASTER_SITES= ${MASTER_SITE_COMP_SOURCES:=unix/volume10/}
XEXTRACT_SUFX= .Z
X
XMAINTAINER= eric@cirr.com
XHOMEPAGE=
XCOMMENT= Copytape duplicates magnetic tapes, with only one drive
X
XBUILD_DEPENDS+= gsharutils>=4.2.1nb2:../../archivers/gsharutils
X
X# MASTER_SITES= ${MASTER_SITE_COMP_SOURCES}
X# DISTNAME= copytape
X# EXTRACT_SUFX= .Z
X
XEXTRACT_CMD= ${GZCAT} ${DOWNLOADED_DISTFILE} | gunshar
X
XMAN1= copytape.1
XMAN5= copytape.5
X
Xdo-install:
X @${INSTALL_PROGRAM} ${WRKSRC}/copytape ${PREFIX}/bin/copytape
X @${INSTALL_MAN} ${WRKSRC}/copytape.1 ${PREFIX}/man/man1/copytape.1
X @${INSTALL_MAN} ${WRKSRC}/copytape.5 ${PREFIX}/man/man5/copytape.5
X
X.include "../../mk/bsd.pkg.mk"
X
XMASTER_SITE_COMP_SOURCES+= \
X ftp://gatekeeper.dec.com/pub/usenet/comp.sources. \
X ftp://ftp.kddlabs.co.jp/Unix/com.sources. \
X ftp://ftp.uu.net/usenet/comp.sources. \
X ftp://ftp.funet.fi/pub/archive/comp.sources. \
X ftp://rtfm.mit.edu/pub/usenet/comp.sources.
X
END-of-Makefile
echo x - PLIST
sed 's/^X//' >PLIST << 'END-of-PLIST'
X@comment $NetBSD$
Xbin/copytape
Xman/man1/copytape.1
Xman/man5/copytape.5
END-of-PLIST
echo x - distinfo
sed 's/^X//' >distinfo << 'END-of-distinfo'
X$NetBSD$
X
XSHA1 (copytape.Z) = 8d955c8086b5d1e67ea7659433bb06ce2d1e6b83
XSize (copytape.Z) = 7924 bytes
XSHA1 (patch-aa) = c658b3116b482042c3dd9aedc703acfeff6f871b
XSHA1 (patch-ab) = e8c9c718a42ee10c2794e358d750f13b1a38af20
END-of-distinfo
echo c - patches
mkdir -p patches > /dev/null 2>&1
echo x - patches/patch-aa
sed 's/^X//' >patches/patch-aa << 'END-of-patches/patch-aa'
X$NetBSD$
X
X+++ copytape.c
X@@ -29,6 +29,7 @@
X
X
X #include <stdio.h>
X+#include <string.h>
X #include <sys/types.h>
X #include <sys/ioctl.h>
X #include <sys/mtio.h>
X@@ -36,7 +37,7 @@
X
X extern int errno;
X
X-#define BUFLEN 262144 /* max tape block size */
X+#define BUFLEN (1024*1024) /* max tape block size */
X #define TAPE_MARK -100 /* return record length if we read a
X * tape mark */
X #define END_OF_TAPE -101 /* 2 consecutive tape marks */
X@@ -149,7 +150,7 @@ main(argc, argv)
X len = input(from);
X } while (len > 0);
X if (len == FORMAT_ERROR) {
X+ perror("copytape: format error on skip");
X exit(-1);
X };
X if (len == END_OF_TAPE) {
END-of-patches/patch-aa
echo x - patches/patch-ab
sed 's/^X//' >patches/patch-ab << 'END-of-patches/patch-ab'
X$NetBSD$
X
X+++ Makefile Fri Oct 23 17:31:27 1998
X@@ -5,7 +5,7 @@
X CFLAGS = -O
X CC = cc $(CFLAGS)
X
X+all copytape: copytape.c
X $(CC) -o copytape copytape.c
X
X install: copytape
END-of-patches/patch-ab
exit
>Release-Note:
>Audit-Trail:
>Unformatted: