Add `LEAF_SETUP_WRKDIRS' option variable which enables a user to
setup leafnode+'s working directories automatically at installation time. Approved by: maintainer
This commit is contained in:
parent
9c107961c1
commit
51a86703bf
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=20002
5 changed files with 69 additions and 23 deletions
|
@ -1,28 +1,37 @@
|
|||
# New ports collection makefile for: leafnode+
|
||||
# Version required: 2.6
|
||||
# Date created: 19 November 1998
|
||||
# Whom: Tom Hukins <tom@eborcom.com>
|
||||
# Whom: Tom Hukins <tom@FreeBSD.org>
|
||||
#
|
||||
# $Id: Makefile,v 1.5 1999/04/07 18:21:49 jseger Exp $
|
||||
# $Id: Makefile,v 1.6 1999/04/22 00:17:13 scrappy Exp $
|
||||
#
|
||||
|
||||
DISTNAME= leafnode+-2.6
|
||||
CATEGORIES= news
|
||||
MASTER_SITES= ftp://ftp.big.or.jp/pub/usr2/jam/leafnode/
|
||||
|
||||
MAINTAINER= tom@eborcom.com
|
||||
MAINTAINER= tom@FreeBSD.org
|
||||
|
||||
MAN8= checkgroups.8 fetchnews.8 leafnode.8 texpire.8
|
||||
PKGINSTALL= ${WRKDIR}/INSTALL
|
||||
|
||||
.if defined(NOPORTDOCS)
|
||||
PLIST= ${PKGDIR}/PLIST.nodocs
|
||||
.endif
|
||||
|
||||
LEAFLIBDIR?= ${PREFIX}/lib/leafnode
|
||||
LEAFSPOOLDIR?= /var/spool/leafnode
|
||||
REWRITE= ${SED} -e "s:@LIBDIR@:${LEAFLIBDIR}:g" \
|
||||
-e "s:@SPOOLDIR@:${LEAFSPOOLDIR}:g" \
|
||||
-e "s:@PREFIX@:${PREFIX}:g"
|
||||
|
||||
post-patch:
|
||||
.for file in FAQ INSTALL README leafnode.8
|
||||
.for file in Makefile FAQ INSTALL README leafnode.8
|
||||
@${MV} ${WRKSRC}/${file} ${WRKSRC}/${file}.bak
|
||||
@${SED} < ${WRKSRC}/${file}.bak > ${WRKSRC}/${file} s+!!PREFIX!!+${PREFIX}+g
|
||||
@${REWRITE} ${WRKSRC}/${file}.bak > ${WRKSRC}/${file}
|
||||
.endfor
|
||||
@${REWRITE} ${FILESDIR}/INSTALL.in > ${PKGINSTALL}
|
||||
@chmod 755 ${PKGINSTALL}
|
||||
|
||||
do-install:
|
||||
.for file in leafnode fetchnews texpire checkgroups leaftool
|
||||
|
@ -38,6 +47,7 @@ do-install:
|
|||
@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/leafnode+
|
||||
.endfor
|
||||
.endif
|
||||
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
|
||||
post-install:
|
||||
@test -d /var/spool/news -a -d ${PREFIX}/lib/leafnode || \
|
||||
|
|
26
news/leafnode+/files/INSTALL.in
Normal file
26
news/leafnode+/files/INSTALL.in
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
LIBDIR=@LIBDIR@
|
||||
SPOOLDIR=@SPOOLDIR@
|
||||
if [ x$2 = xPOST-INSTALL -a x$LEAFNODE_SETUP_WRKDIRS != x ]; then
|
||||
if [ ! -d $LIBDIR ]; then
|
||||
mkdir -p $LIBDIR
|
||||
chown -R news.news $LIBDIR/.
|
||||
fi
|
||||
if [ ! -d $SPOOLDIR ]; then
|
||||
mkdir -p $SPOOLDIR
|
||||
mkdir -p $SPOOLDIR/message.id
|
||||
mkdir -p $SPOOLDIR/interesting.groups
|
||||
mkdir -p $SPOOLDIR/out.going
|
||||
cd $SPOOLDIR/message.id ; for a in 0 1 2 3 4 5 6 7 8 9 ; do \
|
||||
for b in 0 1 2 3 4 5 6 7 8 9 ; do \
|
||||
mkdir -p ${a}${b}0 ${a}${b}1 ${a}${b}2 \
|
||||
${a}${b}3 ${a}${b}4 ${a}${b}5 \
|
||||
${a}${b}6 ${a}${b}7 ${a}${b}8 \
|
||||
${a}${b}9 ; \
|
||||
done
|
||||
done
|
||||
chown -R news.news $SPOOLDIR/.
|
||||
chmod 2750 $SPOOLDIR
|
||||
fi
|
||||
fi
|
||||
exit 0
|
|
@ -1,5 +1,5 @@
|
|||
--- Makefile.orig Sun Jan 31 19:17:52 1999
|
||||
+++ Makefile Tue Apr 6 17:12:29 1999
|
||||
--- Makefile.orig Sun Jul 4 05:32:02 1999
|
||||
+++ Makefile Sun Jul 4 05:32:42 1999
|
||||
@@ -1,11 +1,8 @@
|
||||
# -*- makefile -*-
|
||||
# $Orig-Id: Makefile,v 1.16 1997/07/20 00:28:31 agulbra Exp $
|
||||
|
@ -13,12 +13,17 @@
|
|||
VERSION = 2.6
|
||||
#
|
||||
# if you want to use Socks, use following
|
||||
@@ -27,7 +24,7 @@
|
||||
@@ -23,11 +20,11 @@
|
||||
#CFLAGS = $(DEBUG) -DDOTNGFILE
|
||||
#
|
||||
# this is the directory where the news is stored.
|
||||
-SPOOLDIR = /var/spool/news
|
||||
+SPOOLDIR = @SPOOLDIR@
|
||||
#
|
||||
# this is the directory where the configuration and group information is
|
||||
# kept. It should preferably not be on the same partition as spooldir
|
||||
-LIBDIR = /usr/lib/leafnode
|
||||
+LIBDIR = $(PREFIX)/lib/leafnode
|
||||
+LIBDIR = @LIBDIR@
|
||||
|
||||
all: leafnode fetchnews texpire checkgroups leaftool
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
-Also, see the sample configuration file, "config.example", in the
|
||||
-Leafnode+ distribution.
|
||||
+Also, see the sample configuration file, "config.example", in
|
||||
+!!PREFIX!!/share/doc/leafnode+.
|
||||
+@PREFIX@/share/doc/leafnode+.
|
||||
|
||||
|
||||
6. How do I upgrade from Leafnode?
|
||||
|
@ -17,7 +17,7 @@
|
|||
the LIBDIR defined when compiling Leafnode+, usually
|
||||
-/usr/lib/leafnode. Therefore, the UID under which Leafnode+ runs,
|
||||
-usually root or news, needs write access to this directory.
|
||||
+!!PREFIX!!/lib/leafnode. Therefore, the UID under which Leafnode+
|
||||
+@LIBDIR@. Therefore, the UID under which Leafnode+
|
||||
+runs, usually root or news, needs write access to this directory.
|
||||
|
||||
You will need to change all references to the "fetch" program to
|
||||
|
@ -28,8 +28,8 @@
|
|||
To update from Cornelius's Leafnode, copy
|
||||
-/var/spool/news/leaf.node/groupinfo into your LIBDIR (usually
|
||||
-/usr/lib/leafnode/groupinfo) then run "fetchnews".
|
||||
+/var/spool/news/leaf.node/groupinfo into your LIBDIR
|
||||
+(!!PREFIX!!/lib/leafnode/groupinfo) then run "fetchnews".
|
||||
+@SPOOLDIR@/leaf.node/groupinfo into your LIBDIR
|
||||
+(@LIBDIR@/groupinfo) then run "fetchnews".
|
||||
|
||||
|
||||
7. Can I use Leafnode+ with multiple news servers?
|
||||
|
@ -38,7 +38,7 @@
|
|||
the creation of new groups. The Leafnode+ news server does not
|
||||
support this command. To check if new groups are available, see the
|
||||
-"groupinfo" file in your LIBDIR (usually /usr/lib/leafnode).
|
||||
+"groupinfo" file in your LIBDIR (!!PREFIX!!/lib/leafnode).
|
||||
+"groupinfo" file in your LIBDIR (@LIBDIR@).
|
||||
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
|||
3. make installall
|
||||
|
||||
-4. Edit $(LIBDIR)/config so server points to your upstream news server
|
||||
+4. Edit !!PREFIX!!/lib/leafnode/config so the server points to your
|
||||
+4. Edit @LIBDIR@/config so the server points to your
|
||||
+ upstream news server
|
||||
(generally, your IP provider's). Make sure $NNTPSERVER or
|
||||
/etc/nntpserver points to your own host so clients will talk to
|
||||
|
@ -59,13 +59,13 @@
|
|||
maybe every week. Here is my crontab line, which runs nightly:
|
||||
|
||||
-0 4 * * * /usr/local/sbin/texpire
|
||||
+0 4 * * * !!PREFIX!!/sbin/texpire
|
||||
+0 4 * * * @PREFIX@/sbin/texpire
|
||||
|
||||
I did "crontab -u news -e" as root to edit the crontab file, and
|
||||
added this line. Substituting "1" for the third "*", thus:
|
||||
|
||||
-0 4 * * 1 /usr/local/sbin/texpire
|
||||
+0 4 * * 1 !!PREFIX!!/sbin/texpire
|
||||
+0 4 * * 1 @PREFIX@/sbin/texpire
|
||||
|
||||
tells cron to run texpire at 4am Monday morning.
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
|||
+ incoming NNTP connections. HUP inetd. Here is my inetd.conf line:
|
||||
|
||||
-nntp stream tcp nowait news /usr/local/sbin/leafnode
|
||||
+nntp stream tcp nowait news !!PREFIX!!/sbin/leafnode
|
||||
+nntp stream tcp nowait news @PREFIX@/sbin/leafnode
|
||||
|
||||
This starts leafnode for all connections on the nntp port.
|
||||
|
||||
|
@ -93,26 +93,26 @@
|
|||
be writable by user "news".
|
||||
.PP
|
||||
-.I /usr/lib/leafnode/groupinfo
|
||||
+.I !!PREFIX!!/lib/leafnode/groupinfo
|
||||
+.I @LIBDIR@/groupinfo
|
||||
contains the information about each USENET group. In case of harm, it
|
||||
is rebuilt by
|
||||
.BR fetchnews (8).
|
||||
.PP
|
||||
-.I /usr/lib/leafnode/news-server-name
|
||||
+.I !!PREFIX!!/lib/leafnode/news-server-name
|
||||
+.I @LIBDIR@/news-server-name
|
||||
contains the information about every USENET group on each news server.
|
||||
In case of harm, it
|
||||
is rebuilt by
|
||||
.BR fetchnews (8).
|
||||
.PP
|
||||
-.I /usr/lib/leafnode/news-server-name.active
|
||||
+.I !!PREFIX!!/lib/leafnode/news-server-name.active
|
||||
+.I @LIBDIR@/news-server-name.active
|
||||
is an empty file created when
|
||||
.BR fetchnews (8)
|
||||
get information about every USENET group on each news server.
|
||||
.PP
|
||||
-.I /usr/lib/leafnode/config
|
||||
+.I !!PREFIX!!/lib/leafnode/config
|
||||
+.I @LIBDIR@/config
|
||||
contains the configuration parameters for
|
||||
.B leafnode.
|
||||
See CONFIGURATION below.
|
||||
|
@ -121,7 +121,7 @@
|
|||
.SH CONFIGURATION
|
||||
All configuration is done using the file
|
||||
-.I /usr/lib/leafnode/config.
|
||||
+.I !!PREFIX!!/lib/leafnode/config.
|
||||
+.I @LIBDIR@/config.
|
||||
There is no GUI configuration tool yet.
|
||||
.PP
|
||||
The file is in the common UNIX format: One line per argument, white
|
||||
|
|
|
@ -7,4 +7,9 @@ considerably.
|
|||
|
||||
Leafnode+ contains several enhancements from the original Leafnode.
|
||||
|
||||
You can setenv `LEAFNODE_SETUP_WRKDIRS' variable to `yes' before
|
||||
you make install or pkg_add and needed working directiries
|
||||
(typically PREFIX/lib/leafnode and /var/spool/leafnode)
|
||||
are setup automatically.
|
||||
|
||||
WWW: http://www.io.com/~kazushi/freeware/leafnode+.html
|
||||
|
|
Loading…
Reference in a new issue