1994-09-30 16:09:35 +01:00
|
|
|
# New ports collection makefile for: cnews
|
|
|
|
# Date created: 28 September 1994
|
|
|
|
# Whom: adam
|
|
|
|
#
|
1999-08-30 16:33:04 +02:00
|
|
|
# $FreeBSD$
|
1994-09-30 16:09:35 +01:00
|
|
|
#
|
|
|
|
|
2000-04-09 19:33:32 +02:00
|
|
|
PORTNAME= cnews
|
|
|
|
PORTVERSION= cr.g
|
2006-06-24 10:23:56 +02:00
|
|
|
PORTREVISION= 9
|
1996-11-18 12:44:27 +01:00
|
|
|
CATEGORIES= news
|
1998-12-17 22:54:52 +01:00
|
|
|
MASTER_SITES= ftp://ftp.cs.toronto.edu/pub/c-news/ \
|
|
|
|
ftp://ftp.funet.fi/pub/unix/news/cnews/ \
|
|
|
|
ftp://ftp.redcom.ru/pub/unix/usenet/c-news/ \
|
2002-06-09 13:22:05 +02:00
|
|
|
ftp://ftp.dinoex.org/pub/c-news/ \
|
|
|
|
ftp://ftp.dinoex.org/pub/c-news/:pgp
|
2000-04-13 08:59:20 +02:00
|
|
|
DISTNAME= c-news
|
1995-04-12 01:29:46 +02:00
|
|
|
EXTRACT_SUFX= .tar.Z
|
2000-04-13 08:59:20 +02:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
2002-06-09 13:22:05 +02:00
|
|
|
pgpverify-1.12:pgp
|
2000-04-21 09:52:25 +02:00
|
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
1995-04-12 01:29:46 +02:00
|
|
|
|
2003-07-02 21:11:22 +02:00
|
|
|
PATCH_SITES= ftp://ftp.dinoex.org/pub/c-news/
|
2001-11-10 05:22:00 +01:00
|
|
|
PATCHFILES= c-news-patch-fileart.c c-news-patch-namelen \
|
2005-03-09 06:35:48 +01:00
|
|
|
c-news-patch-newsrun c-news-patch-sendbatches2 \
|
1999-02-22 04:56:56 +01:00
|
|
|
c-news-patch-ctl-pgp3 c-news-patch-ctl-more \
|
|
|
|
c-news-patch-ctl-regexp \
|
|
|
|
c-news-patch-doexpire c-news-patch-queuelen.tay \
|
|
|
|
c-news-patch-bunzip2 \
|
|
|
|
c-news-patch-ctl-underscore \
|
2000-01-24 05:34:39 +01:00
|
|
|
c-news-patch-y2k-2 \
|
2001-11-10 05:22:00 +01:00
|
|
|
c-news-patch-inews-path \
|
2003-07-02 21:11:22 +02:00
|
|
|
c-news-patch-expovguts.c \
|
2000-01-24 05:34:39 +01:00
|
|
|
c-news-patch-pgpverify-1.12-perl4
|
1998-08-30 17:45:35 +02:00
|
|
|
|
2001-06-24 06:28:57 +02:00
|
|
|
MAINTAINER= dinoex@FreeBSD.org
|
2006-06-24 10:23:56 +02:00
|
|
|
COMMENT= An news server
|
1999-02-22 04:56:56 +01:00
|
|
|
|
2000-04-13 08:59:20 +02:00
|
|
|
DIST_SUBDIR= ${DISTNAME}
|
1998-08-30 17:45:35 +02:00
|
|
|
NO_WRKSUBDIR= yes
|
1994-09-30 16:09:35 +01:00
|
|
|
MAKEFILE= makefile
|
1996-11-18 15:17:24 +01:00
|
|
|
MAN1= checknews.1cn inews.1cn postnews.1cn readnews.1cn
|
|
|
|
MAN5= controlperm.5 news.5 newsctl.5 newsdb.5 newsoverview.5 \
|
1996-11-21 13:10:17 +01:00
|
|
|
newssys.5
|
1996-11-18 15:17:24 +01:00
|
|
|
MAN8= cnewsdo.8cn expire.8cn explode.8cn mergeactive.8 \
|
|
|
|
mkhistory.8cn newsaux.8cn newsbatch.8cn newsmail.8cn \
|
|
|
|
newsmaint.8cn newsoverview.8 relaynews.8cn report.8cn \
|
|
|
|
rnews.8cn
|
2004-03-07 07:50:55 +01:00
|
|
|
NEWSCTL_FILES= active active.times batchparms controlperm explist \
|
|
|
|
history history.dir history.pag inews mailname mailpaths \
|
|
|
|
organization postdefltgroup readnews.ctl readnews.help \
|
|
|
|
report.ctl sys versionname whoami
|
2003-06-12 21:25:37 +02:00
|
|
|
PLIST_SUB+= VARBASE=${VARBASE}
|
|
|
|
PLIST_SUB+= NEWSBIN=${NEWSBIN:S=^${PREFIX}/==}
|
|
|
|
PLIST_SUB+= NEWSCTL=${NEWSCTL:S=^${VARBASE}/==}
|
|
|
|
PLIST_SUB+= NEWSCTLBASE=${NEWSCTL:S=/news==:S=^${VARBASE}/==}
|
|
|
|
PLIST_SUB+= NEWSARTS=${NEWSARTS:S=^${VARBASE}/==}
|
|
|
|
PLIST_SUB+= NEWSOV=${NEWSOV:S=^${VARBASE}/==}
|
2004-03-07 07:50:55 +01:00
|
|
|
PLIST_SUB+= NEWSCTL_FILES="${NEWSCTL_FILES}"
|
1995-04-12 01:29:46 +02:00
|
|
|
|
1999-09-07 01:29:26 +02:00
|
|
|
MODIFY= conf/quiz.def \
|
|
|
|
conf/substitutions \
|
|
|
|
include/config.make
|
|
|
|
|
2003-06-12 21:25:37 +02:00
|
|
|
VARBASE?= /var
|
2002-09-01 13:06:43 +02:00
|
|
|
NEWSBIN?= ${PREFIX}/libexec/cnews
|
2003-06-12 21:25:37 +02:00
|
|
|
NEWSCTL?= ${VARBASE}/lib/news
|
|
|
|
NEWSARTS?= ${VARBASE}/news
|
|
|
|
NEWSOV?= ${VARBASE}/news
|
1999-09-07 01:29:26 +02:00
|
|
|
PGPVERIFY?= pgpverify-1.12
|
1999-02-22 04:56:56 +01:00
|
|
|
|
1999-11-26 19:25:20 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2006-06-24 10:23:56 +02:00
|
|
|
.if make(makesum) || defined(FETCH_ALL) || ${OSVERSION} < 470000
|
1999-12-25 02:55:56 +01:00
|
|
|
PATCHFILES+= c-news-patch-gawk3
|
1999-11-26 19:25:20 +01:00
|
|
|
.endif
|
|
|
|
|
2006-10-08 13:28:57 +02:00
|
|
|
.if defined(WITH_SENDMAIL) || defined(WITH_CNEWS_SENDMAIL)
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/sendmail.patch
|
|
|
|
.endif
|
|
|
|
|
1999-02-22 04:56:56 +01:00
|
|
|
pre-patch:
|
|
|
|
@${CP} ${DISTDIR}/${DIST_SUBDIR}/${PGPVERIFY} ${WRKSRC}/${PGPVERIFY}
|
1994-09-30 16:09:35 +01:00
|
|
|
|
1999-09-07 01:29:26 +02:00
|
|
|
pre-configure:
|
|
|
|
.for i in ${MODIFY}
|
|
|
|
@${MV} ${WRKSRC}/${i} ${WRKSRC}/${i}.sed
|
|
|
|
${SED} \
|
|
|
|
-e "s=/usr/local/news/lib/bin/config=${NEWSBIN}/config=" \
|
|
|
|
-e "s=/usr/local/news/cnewsbin=${NEWSBIN}=" \
|
|
|
|
-e "s=/usr/local/news/lib=${NEWSCTL}=" \
|
|
|
|
-e "s=/var/news/over.view=${NEWSOV}=" \
|
|
|
|
-e "s=/var/news=${NEWSARTS}=" \
|
|
|
|
-e "s=/usr/local/bin=${PREFIX}/bin=" \
|
2002-06-16 17:03:10 +02:00
|
|
|
${WRKSRC}/${i}.sed > ${WRKSRC}/${i}
|
1999-09-07 01:29:26 +02:00
|
|
|
.endfor
|
|
|
|
|
1995-04-22 14:06:02 +02:00
|
|
|
do-install:
|
1998-08-30 17:45:35 +02:00
|
|
|
${RM} -f ${PREFIX}/bin/inews
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/libdbz/dbz.h ${PREFIX}/include
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/libcnews.a ${PREFIX}/lib
|
2000-10-10 06:15:51 +02:00
|
|
|
${MKDIR} ${NEWSARTS} ${NEWSOV} ${NEWSBIN} ${NEWSCTL}
|
2001-06-01 08:05:18 +02:00
|
|
|
${CHOWN} ${BINOWN}:${BINGRP} ${NEWSBIN}
|
1999-02-22 04:56:56 +01:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/${PGPVERIFY} ${NEWSBIN}/pgpverify
|
1998-08-30 17:45:35 +02:00
|
|
|
cd ${WRKSRC}; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} install
|
|
|
|
cd ${WRKSRC}; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} setup
|
|
|
|
cd ${WRKSRC}; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ui readpostcheck
|
|
|
|
.for f in checknews cnewsdo inews injnews postnews readnews
|
2001-06-01 08:05:18 +02:00
|
|
|
${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/bin/$f
|
1998-08-30 17:45:35 +02:00
|
|
|
.endfor
|
2001-06-01 08:05:18 +02:00
|
|
|
${CHOWN} -R news:news ${NEWSARTS} ${NEWSOV} ${NEWSCTL}
|
|
|
|
${CHOWN} news:news ${NEWSBIN}/input/newsspool
|
2001-01-24 07:23:07 +01:00
|
|
|
${CHMOD} 6555 ${NEWSBIN}/input/newsspool
|
1999-02-22 04:56:56 +01:00
|
|
|
.for i in ${MAN1}
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/${i} ${PREFIX}/man/man1
|
|
|
|
.endfor
|
|
|
|
.for i in ${MAN5}
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/${i} ${PREFIX}/man/man5
|
|
|
|
.endfor
|
|
|
|
.for i in ${MAN8}
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/${i} ${PREFIX}/man/man8
|
|
|
|
.endfor
|
2004-03-07 07:50:55 +01:00
|
|
|
${MKDIR} ${EXAMPLESDIR}/newsctl
|
|
|
|
@${TAR} -C ${NEWSCTL} -cf - . | ${TAR} -C ${EXAMPLESDIR}/newsctl -xf -
|
2003-09-24 19:28:58 +02:00
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "!!!!!!!!"
|
|
|
|
@${ECHO_MSG} "you MUST change the configuration of this news setup:"
|
|
|
|
@${ECHO_MSG} " cd to ${NEWSCTL} and change the following files..."
|
|
|
|
@${ECHO_MSG} "mailname, whoami, organization, mailpaths, sys, readnews.ctl, postdefltgroup"
|
|
|
|
@${ECHO_MSG} " to suit your local system and news topology."
|
|
|
|
@${ECHO_MSG} "check that you have vaild aliases in report.ctl,"
|
|
|
|
@${ECHO_MSG} " so any problem can be reported."
|
|
|
|
@${ECHO_MSG} "!!!!!!!!"
|
|
|
|
@${ECHO_MSG} ""
|
2004-03-07 07:50:55 +01:00
|
|
|
.if !defined(BATCH)
|
|
|
|
@if test "$$(pw usershow news)" != "news:*:8:8::0:0:News Subsystem:${NEWSCTL}:${SHELL}"; then \
|
|
|
|
pw usermod news -d "${NEWSCTL}" -s ${SHELL}; fi
|
|
|
|
@pw usershow news
|
|
|
|
.endif
|
1994-09-30 16:09:35 +01:00
|
|
|
|
2002-01-06 00:43:13 +01:00
|
|
|
test:
|
2001-11-10 05:22:00 +01:00
|
|
|
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
|
|
|
|
${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} r)
|
|
|
|
|
1999-11-26 19:25:20 +01:00
|
|
|
.include <bsd.port.post.mk>
|