Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Nov 1997 04:21:35 -0800 (PST)
From:      dburr@POBoxes.com
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   ports/5175: NEW PORT: news/xmitBin, a binary files auto-poster
Message-ID:  <199711291221.EAA22881@DonaldBurr.dyn.ml.org>
Resent-Message-ID: <199711291220.EAA29158@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         5175
>Category:       ports
>Synopsis:       NEW PORT: news/xmitBin, a binary files auto-poster
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 29 04:20:00 PST 1997
>Last-Modified:
>Originator:     Donald Burr
>Organization:
Starfleet Command
>Release:        FreeBSD 2.2.5-RELEASE i386
>Environment:

Built, tested, and installed on a 2.2.5-RELEASE system, but I don't see
why it won't work on any other fairly modern FreeBSD system...

>Description:

xmitBin allows you to post large binary postings (well, any large posting)
to usenet newsgroups, to someone via e-mail, or both.  It will post
intelligently, meaning uuencoding binaries, splitting large files across
multiple postings, and generally making it easier for those reading your
posts to find and decode all pieces of your post, and not getting usenet
site admins mad at you for posting large binaries in one chunk.  If you've
ever wanted to post to any of the alt.binaries.* groups, this is the tool
for you!

I have included two shell scripts of my own, "mailbin" and "postbin".
These scripts make it easy to mail and post (respectively) stuff using
a good default set of command line switches.

[ This port is maintained by Donald Burr <dburr@POBoxes.com>. ]

>How-To-Repeat:
>Fix:
	
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.1.4).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1997-11-29 04:19 PST by <dburr@DonaldBurr.dyn.ml.org>.
# Source directory was `/usr/ports/news'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#    439 -rw-r--r-- xmitBin/Makefile
#     59 -rw-r--r-- xmitBin/files/md5
#   3898 -rw-r--r-- xmitBin/patches/patch-aa
#     57 -rw-r--r-- xmitBin/pkg/COMMENT
#    772 -rw-r--r-- xmitBin/pkg/DESCR
#    164 -rw-r--r-- xmitBin/pkg/PLIST
#    808 -rw-r--r-- xmitBin/pkg/MESSAGE
#
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  echo 'WARNING: not restoring timestamps.  Consider getting and'
  echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
# ============= xmitBin/Makefile ==============
if test ! -d 'xmitBin'; then
  echo 'x - creating directory xmitBin'
  mkdir 'xmitBin'
fi
if test -f 'xmitBin/Makefile' && test X"$1" != X"-c"; then
  echo 'x - skipping xmitBin/Makefile (file already exists)'
else
  echo 'x - extracting xmitBin/Makefile (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmitBin/Makefile' &&
# New ports collection makefile for:    xmitBin
# Version required:     1.9
# Date created:         29 Nov 1997
# Whom:                 Donald Burr <dburr@POBoxes.com>
#
# $Id$
#
X
DISTNAME=	xmitBin-1.9
CATEGORIES=	news mail
MASTER_SITES=	ftp://ftp.cadence.com/utils/
EXTRACT_SUFX=	.tar.Z
X
MAINTAINER=	dburr@POBoxes.com
X
MAN1=		xmitBin.1
NO_WRKSUBDIR=	YES
PATCH_STRIP=	-p1
X
post-install:
X		@${CAT} ${PKGDIR}/MESSAGE
X
X.include <bsd.port.mk>
SHAR_EOF
  $shar_touch -am 1129041497 'xmitBin/Makefile' &&
  chmod 0644 'xmitBin/Makefile' ||
  echo 'restore of xmitBin/Makefile failed'
  shar_count="`wc -c < 'xmitBin/Makefile'`"
  test 439 -eq "$shar_count" ||
    echo "xmitBin/Makefile: original size 439, current size $shar_count"
fi
# ============= xmitBin/files/md5 ==============
if test ! -d 'xmitBin/files'; then
  echo 'x - creating directory xmitBin/files'
  mkdir 'xmitBin/files'
fi
if test -f 'xmitBin/files/md5' && test X"$1" != X"-c"; then
  echo 'x - skipping xmitBin/files/md5 (file already exists)'
else
  echo 'x - extracting xmitBin/files/md5 (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmitBin/files/md5' &&
MD5 (xmitBin-1.9.tar.Z) = 7ac853f2dcf327b89f2f44d932d43596
SHAR_EOF
  $shar_touch -am 1129030897 'xmitBin/files/md5' &&
  chmod 0644 'xmitBin/files/md5' ||
  echo 'restore of xmitBin/files/md5 failed'
  shar_count="`wc -c < 'xmitBin/files/md5'`"
  test 59 -eq "$shar_count" ||
    echo "xmitBin/files/md5: original size 59, current size $shar_count"
fi
# ============= xmitBin/patches/patch-aa ==============
if test ! -d 'xmitBin/patches'; then
  echo 'x - creating directory xmitBin/patches'
  mkdir 'xmitBin/patches'
fi
if test -f 'xmitBin/patches/patch-aa' && test X"$1" != X"-c"; then
  echo 'x - skipping xmitBin/patches/patch-aa (file already exists)'
else
  echo 'x - extracting xmitBin/patches/patch-aa (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmitBin/patches/patch-aa' &&
diff -ruN OLD/Makefile NEW/Makefile
--- OLD/Makefile	Sun Jan 30 09:24:09 1994
+++ NEW/Makefile	Sat Nov 29 04:16:09 1997
@@ -1,5 +1,5 @@
X # Installation directory...
-INSTDIR	= /mnt3/deej
+INSTDIR	= /usr/local
X # Where to install the program itself...
X BINDIR 	= ${INSTDIR}/bin
X # Where to put the man page...
@@ -14,7 +14,7 @@
X # (NOTE!  This also applies to "sendmail" and "ELM" usage!)
X # This option when used with "sendmail" provides the greatest amount of
X # xmitBin functionality, so it's the default...
-CCOPTS 	= -DSysVMail
+# CCOPTS 	= -DSysVMail
X # ...BSD mailing on a BSD system...
X # CCOPTS	=
X # ...you might also want to define "SYSV" if you're on a System V machine
@@ -24,11 +24,13 @@
X # ...of course, you could do both, too!
X # CCOPTS 	= -DSYSV -DSysVMail
X # ...options for gcc on a Linux 386/486 system...
-# CCOPTS	= -06 -Wall -DSYSV -DSysVMail
+# CCOPTS	= -06 -m486 -Wall -DSYSV -DSysVMail
X # ...options for SCO UNIX...
X # CCOPTS	= -DSCO -DSYSV
X # ...options for Apollo...
X # CCOPTS	= -DAPOLLO -DSysVMail
+# ...options for FreeBSD...
+CCOPTS		= -O6 -m486 -Wall -DSysVMail
X 
X #
X # END OF USER-CONFIGURABLE ITEMS - NO MODIFICATIONS BEYOND THIS POINT SHOULD
@@ -44,13 +46,23 @@
X clean:
X 	rm -f ${TARGET} ${OBJS}
X 
-install: ${BINDIR}/${TARGET} ${MANDIR}/man1/${TARGET}.1
+install: ${BINDIR}/${TARGET} ${MANDIR}/man1/${TARGET}.1 extras
X 
X ${BINDIR}/${TARGET}: ${TARGET}
-	cp ${TARGET} ${BINDIR}
+	install -c -s -o root -g wheel -m 111 ${TARGET} ${BINDIR}/${TARGET}
X 
X ${MANDIR}/man1/${TARGET}.1: ${TARGET}.1
-	cp ${TARGET}.1 ${MANDIR}/man1
+	install -c -m 644 -o bin -g bin ${TARGET}.1 ${MANDIR}/man1/${TARGET}.1
+
+extras:	mailbin postbin
+	install -c -o root -g wheel -m 755 mailbin ${BINDIR}/mailbin
+	install -c -o root -g wheel -m 755 postbin ${BINDIR}/postbin
+	install -c -d -o bin -g bin -m 755 /usr/local/lib/xmitBin
+	install -c -o root -g wheel -m 755 autoSend /usr/local/lib/xmitBin/autoSend
+	install -c -o root -g wheel -m 644 doList.awk ${BINDIR}/doList.awk
+	install -c -o root -g wheel -m 644 mkList.awk ${BINDIR}/mkList.awk
+	install -c -o bin -g bin -m 644 autoSend.txt /usr/local/lib/xmitBin/autoSend.txt
+	install -c -o bin -g bin -m 644 anonymous.anondat /usr/local/lib/xmitBin/anonymous.anondat
X 
X ${TARGET}: ${OBJS}
X 	${CC} -o ${TARGET} ${OBJS}
diff -ruN OLD/autoSend NEW/autoSend
--- OLD/autoSend	Wed Sep 15 03:14:16 1993
+++ NEW/autoSend	Sat Nov 29 04:15:37 1997
@@ -1,7 +1,7 @@
X #!/bin/csh -f
X # These next two definitions need to be configured for each user!
-set datDir = /mnt3/deej/gif/autoSend
-set binDir = /mnt3/deej/bin
+set datDir = /tmp/autoSend
+set binDir = /usr/local/bin
X # OK, all standard stuff now...
X echo ""
X echo "AutoSend run started `date`"
diff -ruN OLD/mailbin NEW/mailbin
--- OLD/mailbin	Wed Dec 31 16:00:00 1969
+++ NEW/mailbin	Sat Nov 29 04:15:38 1997
@@ -0,0 +1,24 @@
+#!/bin/sh
+MAILER="Mail"
+DSCDIR=${HOME}/.xmitBin
+if [ ! -d ${DSCDIR} ]
+then
+	echo creating ${DSCDIR}
+	mkdir ${DSCDIR}
+fi
+export MAILER DSCDIR
+
+if [ $# -ne 3 ]
+then
+	echo "usage: ${0} email filename title"
+	echo "NOTE: title must be all one argument, so enclose it in quotes!"
+	exit 1
+fi
+
+ADDR=${1}
+FILE=${2}
+TITLE=${3}
+
+exec xmitBin -mail -d ${ADDR} -f ${FILE} -verbose "${TITLE}"
+# -l label to put in titlebar
+# consider -noscript
diff -ruN OLD/postbin NEW/postbin
--- OLD/postbin	Wed Dec 31 16:00:00 1969
+++ NEW/postbin	Sat Nov 29 04:15:38 1997
@@ -0,0 +1,24 @@
+#!/bin/sh
+POSTER="inews -h"
+DSCDIR=${HOME}/.xmitBin
+if [ ! -d ${DSCDIR} ]
+then
+        echo creating ${DSCDIR}
+        mkdir ${DSCDIR}
+fi
+export POSTER DSCDIR
+
+if [ $# -ne 3 ]
+then
+	echo "usage: ${0} newsgroup filename title"
+	echo "NOTE: title must be all one argument, so enclose it in quotes!"
+	exit 1
+fi
+
+NG=${1}
+FILE=${2}
+TITLE=${3}
+
+exec xmitBin -post -d ${NG} -f ${FILE} -verbose "${TITLE}"
+# -l label to put in titlebar
+# consider -noscript
SHAR_EOF
  $shar_touch -am 1129041797 'xmitBin/patches/patch-aa' &&
  chmod 0644 'xmitBin/patches/patch-aa' ||
  echo 'restore of xmitBin/patches/patch-aa failed'
  shar_count="`wc -c < 'xmitBin/patches/patch-aa'`"
  test 3898 -eq "$shar_count" ||
    echo "xmitBin/patches/patch-aa: original size 3898, current size $shar_count"
fi
# ============= xmitBin/pkg/COMMENT ==============
if test ! -d 'xmitBin/pkg'; then
  echo 'x - creating directory xmitBin/pkg'
  mkdir 'xmitBin/pkg'
fi
if test -f 'xmitBin/pkg/COMMENT' && test X"$1" != X"-c"; then
  echo 'x - skipping xmitBin/pkg/COMMENT (file already exists)'
else
  echo 'x - extracting xmitBin/pkg/COMMENT (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmitBin/pkg/COMMENT' &&
Posts or mails binary and sourcecode files intelligently
SHAR_EOF
  $shar_touch -am 1129031797 'xmitBin/pkg/COMMENT' &&
  chmod 0644 'xmitBin/pkg/COMMENT' ||
  echo 'restore of xmitBin/pkg/COMMENT failed'
  shar_count="`wc -c < 'xmitBin/pkg/COMMENT'`"
  test 57 -eq "$shar_count" ||
    echo "xmitBin/pkg/COMMENT: original size 57, current size $shar_count"
fi
# ============= xmitBin/pkg/DESCR ==============
if test -f 'xmitBin/pkg/DESCR' && test X"$1" != X"-c"; then
  echo 'x - skipping xmitBin/pkg/DESCR (file already exists)'
else
  echo 'x - extracting xmitBin/pkg/DESCR (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmitBin/pkg/DESCR' &&
xmitBin allows you to post large binary postings (well, any large posting)
to usenet newsgroups, to someone via e-mail, or both.  It will post
intelligently, meaning uuencoding binaries, splitting large files across
multiple postings, and generally making it easier for those reading your
posts to find and decode all pieces of your post, and not getting usenet
site admins mad at you for posting large binaries in one chunk.  If you've
ever wanted to post to any of the alt.binaries.* groups, this is the tool
for you!
X
I have included two shell scripts of my own, "mailbin" and "postbin".
These scripts make it easy to mail and post (respectively) stuff using
a good default set of command line switches.
X
[ This port is maintained by Donald Burr <dburr@POBoxes.com>. ]
SHAR_EOF
  $shar_touch -am 1129034297 'xmitBin/pkg/DESCR' &&
  chmod 0644 'xmitBin/pkg/DESCR' ||
  echo 'restore of xmitBin/pkg/DESCR failed'
  shar_count="`wc -c < 'xmitBin/pkg/DESCR'`"
  test 772 -eq "$shar_count" ||
    echo "xmitBin/pkg/DESCR: original size 772, current size $shar_count"
fi
# ============= xmitBin/pkg/PLIST ==============
if test -f 'xmitBin/pkg/PLIST' && test X"$1" != X"-c"; then
  echo 'x - skipping xmitBin/pkg/PLIST (file already exists)'
else
  echo 'x - extracting xmitBin/pkg/PLIST (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmitBin/pkg/PLIST' &&
bin/xmitBin
bin/mailbin
bin/postbin
bin/doList.awk
bin/mkList.awk
man/man1/xmitBin.1.gz
lib/xmitBin/autoSend
lib/xmitBin/autoSend.txt
lib/xmitBin/anonymous.anondat
SHAR_EOF
  $shar_touch -am 1129041697 'xmitBin/pkg/PLIST' &&
  chmod 0644 'xmitBin/pkg/PLIST' ||
  echo 'restore of xmitBin/pkg/PLIST failed'
  shar_count="`wc -c < 'xmitBin/pkg/PLIST'`"
  test 164 -eq "$shar_count" ||
    echo "xmitBin/pkg/PLIST: original size 164, current size $shar_count"
fi
# ============= xmitBin/pkg/MESSAGE ==============
if test -f 'xmitBin/pkg/MESSAGE' && test X"$1" != X"-c"; then
  echo 'x - skipping xmitBin/pkg/MESSAGE (file already exists)'
else
  echo 'x - extracting xmitBin/pkg/MESSAGE (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmitBin/pkg/MESSAGE' &&
A couple of notes on this package/port...
X
* I have included two scripts of my own design, postbin and mailbin.
X  They allow you to easily mail and post stuff using a fairly generic
X  (i.e. probably useful for most people) set of options.
X
* Documentation and sample configuration files are located in
X  /usr/local/lib/xmitBin/.
X
* A script, autoSend, has been included.  This script is intended to be
X  run automatically (e.g. by cron(8)).  It will allow you to periodically
X  post stuff on a regular basis.  See the "autoSend.txt" documentation
X  file for more information.  The script is located at
X  /usr/local/lib/xmitBin/autoSend.  Each user who wishes to use it
X  should copy it to a directory where scripts are kept (e.g. $HOME/bin),
X  and then modify it to suit him/her according to the directions.
SHAR_EOF
  $shar_touch -am 1129041697 'xmitBin/pkg/MESSAGE' &&
  chmod 0644 'xmitBin/pkg/MESSAGE' ||
  echo 'restore of xmitBin/pkg/MESSAGE failed'
  shar_count="`wc -c < 'xmitBin/pkg/MESSAGE'`"
  test 808 -eq "$shar_count" ||
    echo "xmitBin/pkg/MESSAGE: original size 808, current size $shar_count"
fi
exit 0
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711291221.EAA22881>