summaryrefslogtreecommitdiff
path: root/news/inn/Makefile
blob: a9b2a3b5c020b8334ee6e53fb65c3283d570ee4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# $NetBSD: Makefile,v 1.6 1999/07/21 22:29:36 tron Exp $

DISTNAME=		inn-2.2
CATEGORIES=		news
MASTER_SITES=		ftp://ftp.isc.org/isc/inn/ \
			ftp://ftp.sunet.se/pub/news/nntp/inn/ \
			ftp://ftp.fu-berlin.de/unix/news/inn/

MAINTAINER=		tron@netbsd.org
HOMEPAGE=		http://www.isc.org/inn.html

BUILD_DEPENDS+=		bison:../../devel/bison

CONFLICTS+=		nntpclnt-*

INN_DATA_DIR?=		/var/news

USE_PERL5=		yes
USE_LIBTOOL=		yes
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--with-perl --with-tmp-path=/tmp \
			--with-sendmail=/usr/sbin/sendmail \
			--with-db-dir=${INN_DATA_DIR}/db \
			--with-etc-dir=${INN_DATA_DIR}/etc \
			--with-log-dir=${INN_DATA_DIR}/log \
			--with-run-dir=${INN_DATA_DIR}/run \
			--with-spool-dir=${INN_DATA_DIR}/spool
CONFIGURE_ENV+=		_PATH_PERL=${LOCALBASE}/bin/perl

DEINSTALL_FILE=		${WRKDIR}/DEINSTALL
INSTALL_FILE=		${WRKDIR}/INSTALL

post-build:
	${SED} -e 's#@@INN_DATA_DIR@@#${INN_DATA_DIR}#g' \
	       -e 's#@@PREFIX@@#${PREFIX}#g' \
	        ${FILESDIR}/innd.sh >${WRKDIR}/innd.sh
.for FILE in DEINSTALL INSTALL
	${SED} -e 's#@@INN_DATA_DIR@@#${INN_DATA_DIR}#g' \
	       -e 's#@@PREFIX@@#${PREFIX}#g' \
	        ${PKGDIR}/${FILE} >${WRKDIR}/${FILE}
.endfor

pre-install:
	${MKDIR} ${INN_DATA_DIR}

post-install:
	${MKDIR} ${PREFIX}/share/examples/inn
	for FILE in `ls -1 ${WRKSRC}/samples/* | \
		     ${EGREP} -v '\.(in|orig)$'`; do \
	  ${INSTALL_DATA} $$FILE ${PREFIX}/share/examples/inn; \
	done
	cd ${WRKSRC}/site && \
	${INSTALL_SCRIPT} ${WRKDIR}/innd.sh ${PREFIX}/etc/rc.d
	@${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL

.include "../../mk/bsd.pkg.mk"