2006-09-09 04:49:32 +02:00
|
|
|
# $NetBSD: Makefile,v 1.13 2006/09/09 02:49:32 obache Exp $
|
2003-09-30 17:39:59 +02:00
|
|
|
|
|
|
|
DISTNAME= c-news
|
2006-01-31 03:57:34 +01:00
|
|
|
PKGNAME= c-news-CR-7
|
2003-09-30 17:39:59 +02:00
|
|
|
CATEGORIES= news
|
|
|
|
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/ \
|
|
|
|
ftp://ftp.dinoex.org/pub/c-news/
|
|
|
|
EXTRACT_SUFX= .tar.Z
|
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
|
|
|
pgpverify-1.12
|
|
|
|
|
|
|
|
PATCH_SITES= ftp://ftp.lan-ks.de/pub/c-news/ \
|
|
|
|
ftp://ftp.dinoex.org/pub/c-news/
|
|
|
|
PATCHFILES= c-news-patch-fileart.c c-news-patch-namecheck.awk \
|
|
|
|
c-news-patch-newsrun c-news-patch-sendbatches \
|
|
|
|
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 \
|
|
|
|
c-news-patch-y2k-2 \
|
2003-10-02 17:30:36 +02:00
|
|
|
c-news-patch-inews-path \
|
|
|
|
c-news-patch-expovguts.c \
|
2003-09-30 17:39:59 +02:00
|
|
|
c-news-patch-pgpverify-1.12-perl4 \
|
|
|
|
c-news-patch-gawk3
|
|
|
|
|
|
|
|
MAINTAINER= hauke@Espresso.Rhein-Neckar.DE
|
|
|
|
HOMEPAGE= http://www.dinoex.net/c-news.html
|
|
|
|
COMMENT= The 3rd generation USENET news server
|
|
|
|
|
|
|
|
CONFLICTS+= nntpclnt-[0-9]* inn*
|
|
|
|
|
2004-02-28 00:13:27 +01:00
|
|
|
WRKSRC= ${WRKDIR}
|
2006-01-31 03:57:34 +01:00
|
|
|
PKG_USERS= news:news::Internet\ News:${CNEWSDATA:Q}:${SH:Q}
|
2003-09-30 17:39:59 +02:00
|
|
|
PKG_GROUPS= news
|
|
|
|
|
2006-01-31 03:57:34 +01:00
|
|
|
PKG_SYSCONFDIR.c-news= ${CNEWSDATA}/etc
|
2005-01-13 14:04:10 +01:00
|
|
|
|
|
|
|
EGDIR= ${PREFIX}/share/examples/c-news
|
|
|
|
|
|
|
|
|
2003-09-30 17:39:59 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
.if (${OPSYS} == "SunOS")
|
|
|
|
# groff & pic
|
|
|
|
BUILD_DEPENDS+= groff:../../textproc/groff
|
|
|
|
PIC?= gpic
|
2005-01-13 14:04:10 +01:00
|
|
|
NROFF?= groff -Tascii -mtty-char
|
2003-09-30 17:39:59 +02:00
|
|
|
.else
|
|
|
|
PIC?= pic
|
2005-01-13 14:04:10 +01:00
|
|
|
NROFF?= nroff -Tascii
|
2003-09-30 17:39:59 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
|
|
|
CONFLICTS= inn-[1-9]*
|
2006-09-09 04:49:32 +02:00
|
|
|
MAKE_FILE= makefile
|
2003-09-30 17:39:59 +02:00
|
|
|
DIST_SUBDIR= ${DISTNAME}
|
|
|
|
|
|
|
|
.include "Makefile.common"
|
|
|
|
|
|
|
|
MAN1= checknews.1cn inews.1cn postnews.1cn readnews.1cn
|
|
|
|
MAN5= controlperm.5 news.5 newsctl.5 newsdb.5 newsoverview.5 \
|
|
|
|
newssys.5
|
|
|
|
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
|
|
|
|
|
|
|
|
DOCS= guide.more guide.ps index.ps toc.ps
|
|
|
|
NOTEBOOK= locking.more makefiles.more locking.ps makefiles.ps
|
|
|
|
|
|
|
|
PGPVERIFY?= pgpverify-1.12
|
|
|
|
|
|
|
|
.if (${OPSYS} == "SunOS")
|
|
|
|
FILES_SUBST_SED+= "-e s!statfs!statvfs!g"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-patch:
|
2006-01-31 03:57:34 +01:00
|
|
|
@${CP} ${DISTDIR:Q}/${DIST_SUBDIR:Q}/${PGPVERIFY:Q} ${WRKSRC:Q}/${PGPVERIFY:Q}
|
2003-09-30 17:39:59 +02:00
|
|
|
|
|
|
|
pre-configure:
|
|
|
|
${SED} ${FILES_SUBST_SED} \
|
2006-01-31 03:57:34 +01:00
|
|
|
${FILESDIR:Q}/substitutions > ${WRKDIR:Q}/conf/substitutions
|
2003-09-30 17:39:59 +02:00
|
|
|
${SED} ${FILES_SUBST_SED} \
|
2006-01-31 03:57:34 +01:00
|
|
|
${FILESDIR:Q}/quiz.def > ${WRKDIR:Q}/conf/quiz.def
|
2003-09-30 17:39:59 +02:00
|
|
|
${SED} ${FILES_SUBST_SED} \
|
2006-01-31 03:57:34 +01:00
|
|
|
${FILESDIR:Q}/config.make > ${WRKDIR:Q}/include/config.make
|
|
|
|
${CP} ${FILESDIR:Q}/makeinc ${WRKDIR:Q}/conf/makeinc
|
|
|
|
${CP} ${FILESDIR:Q}/makefile.notebook ${WRKDIR:Q}/notebook/makefile
|
2003-09-30 17:39:59 +02:00
|
|
|
|
2005-01-13 14:04:10 +01:00
|
|
|
# One of the tests does not work correctly if we are in a union-mounted
|
|
|
|
# directory.
|
|
|
|
post-build: build-doc # regression
|
2003-09-30 17:39:59 +02:00
|
|
|
|
2006-01-31 03:57:34 +01:00
|
|
|
.PHONY: regression
|
2003-09-30 17:39:59 +02:00
|
|
|
regression:
|
2006-01-31 03:57:34 +01:00
|
|
|
cd ${WRKSRC:Q} && ${MAKE} ${MAKEFLAGS} r
|
2003-09-30 17:39:59 +02:00
|
|
|
|
2006-01-31 03:57:34 +01:00
|
|
|
.PHONY: build-doc
|
2003-09-30 17:39:59 +02:00
|
|
|
build-doc:
|
2006-01-31 03:57:34 +01:00
|
|
|
cd ${WRKSRC:Q}/doc && \
|
2006-01-17 10:13:36 +01:00
|
|
|
${MAKE} PIC=${PIC:Q} NROFF=${NROFF:Q} ${MAKE_FLAGS}
|
2006-01-31 03:57:34 +01:00
|
|
|
cd ${WRKSRC:Q}/notebook && ${MAKE} ${MAKE_FLAGS}
|
2003-09-30 17:39:59 +02:00
|
|
|
|
|
|
|
do-install:
|
2006-01-31 03:57:34 +01:00
|
|
|
${RM} -f ${PREFIX:Q}/bin/inews
|
|
|
|
${INSTALL_DATA} ${WRKSRC:Q}/libdbz/dbz.h ${PREFIX:Q}/include
|
|
|
|
${INSTALL_DATA} ${WRKSRC:Q}/libcnews.a ${PREFIX:Q}/lib
|
2003-09-30 17:39:59 +02:00
|
|
|
${MKDIR} ${CNEWSARTS} ${CNEWSOV} ${CNEWSBIN} ${CNEWSCTL}
|
|
|
|
${CHOWN} ${BINOWN}:${BINGRP} ${CNEWSBIN}
|
2006-01-31 03:57:34 +01:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC:Q}/${PGPVERIFY:Q} ${CNEWSBIN:Q}/pgpverify
|
2006-09-09 04:49:32 +02:00
|
|
|
cd ${WRKSRC:Q} && ${MAKE} ${MAKE_FLAGS} ${MAKE_FILE} install
|
|
|
|
cd ${WRKSRC:Q} && ${MAKE} ${MAKE_FLAGS} ${MAKE_FILE} setup
|
|
|
|
cd ${WRKSRC:Q} && ${MAKE} ${MAKE_FLAGS} ${MAKE_FILE} ui readpostcheck
|
2003-09-30 17:39:59 +02:00
|
|
|
.for f in checknews cnewsdo inews injnews postnews readnews
|
2006-01-31 03:57:34 +01:00
|
|
|
${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX:Q}/bin/${f:Q}
|
2003-09-30 17:39:59 +02:00
|
|
|
.endfor
|
|
|
|
${CHOWN} -R news:news ${CNEWSARTS} ${CNEWSOV} ${CNEWSCTL}
|
2006-01-31 03:57:34 +01:00
|
|
|
${CHOWN} news:news ${CNEWSBIN:Q}/input/newsspool
|
|
|
|
${CHMOD} 6555 ${CNEWSBIN:Q}/input/newsspool
|
2003-09-30 17:39:59 +02:00
|
|
|
.for i in ${MAN1}
|
2006-04-20 15:36:34 +02:00
|
|
|
${INSTALL_MAN} ${WRKSRC:Q}/man/${i:Q} ${PREFIX:Q}/${PKGMANDIR}/man1/${i:R:Q}.1
|
2003-09-30 17:39:59 +02:00
|
|
|
.endfor
|
|
|
|
.for i in ${MAN5}
|
2006-04-20 15:36:34 +02:00
|
|
|
${INSTALL_MAN} ${WRKSRC:Q}/man/${i:Q} ${PREFIX:Q}/${PKGMANDIR}/man5/${i:R:Q}.5
|
2003-09-30 17:39:59 +02:00
|
|
|
.endfor
|
|
|
|
.for i in ${MAN8}
|
2006-04-20 15:36:34 +02:00
|
|
|
${INSTALL_MAN} ${WRKSRC:Q}/man/${i:Q} ${PREFIX:Q}/${PKGMANDIR}/man8/${i:R:Q}.8
|
2003-09-30 17:39:59 +02:00
|
|
|
.endfor
|
|
|
|
# install docs:
|
2006-01-31 03:57:34 +01:00
|
|
|
${INSTALL_MAN_DIR} ${PREFIX:Q}/share/doc/cnews
|
2003-09-30 17:39:59 +02:00
|
|
|
.for i in ${DOCS}
|
2006-01-31 03:57:34 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC:Q}/doc/${i:Q} ${PREFIX:Q}/share/doc/cnews
|
2003-09-30 17:39:59 +02:00
|
|
|
.endfor
|
|
|
|
.for i in ${NOTEBOOK}
|
2006-01-31 03:57:34 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC:Q}/notebook/${i:Q} ${PREFIX:Q}/share/doc/cnews
|
2003-09-30 17:39:59 +02:00
|
|
|
.endfor
|
|
|
|
# install sample config files
|
2006-01-31 03:57:34 +01:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX:Q}/share/examples/cnews
|
|
|
|
set -e; \
|
|
|
|
for FILE in `ls -1 ${WRKSRC:Q}/conf/*.eg` \
|
|
|
|
${WRKSRC:Q}/conf/cron.proto ${WRKSRC:Q}/conf/organization; do \
|
|
|
|
${INSTALL_DATA} "$$FILE" ${PREFIX:Q}/share/examples/cnews; \
|
2003-09-30 17:39:59 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|