summaryrefslogtreecommitdiffstats
path: root/news/leafnode/Makefile
blob: 6145bd2e4802bcb2dd0408bf5b3f52541d267d5f (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# ports collection Makefile for: leafnode
# Whom:			Brian Somers <brian@FreeBSD.org>
# Date created:		1997-06-27
#
# $FreeBSD$
#

PORTNAME=	leafnode
PORTVERSION=	1.10.1
PORTREVISION=	0
CATEGORIES=	news
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED:S/$/:sourceforge/} \
		http://osdn.dl.sourceforge.net/sourceforge/${PORTNAME}/:sourceforge \
		http://www.dt.e-technik.uni-dortmund.de/~ma/${PORTNAME}/ \
		${MASTER_SITE_SUNSITE:S/$/:sunsite/}
MASTER_SITE_SUBDIR=	${PORTNAME}/:sourceforge \
			./:DEFAULT \
			system/news/transport/:sunsite
DISTNAME=	${PORTNAME}-${PORTVERSION}.rel
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:sourceforge,sunsite,DEFAULT

MAINTAINER=	matthias.andree@gmx.de
COMMENT=	NNTP package for offline news caching and reading

LIB_DEPENDS=	pcre.0:${PORTSDIR}/devel/pcre

USE_BZIP2=	yes
GNU_CONFIGURE=	yes

.include <bsd.port.pre.mk>

.if exists(/var/spool/news/leaf.node) && !defined(PACKAGE_BUILDING)
LEAFNODE_SPOOLDIR?=/var/spool/news
.elif exists(${LOCALBASE}/var/spool/leafnode/leaf.node) && !defined(PACKAGE_BUILDING)
LEAFNODE_SPOOLDIR?=${LOCALBASE}/var/spool/leafnode
.endif
LEAFNODE_SPOOLDIR?=/var/spool/leafnode
PLIST_SUB=	SPOOLDIR=${LEAFNODE_SPOOLDIR}

CONFIGURE_ARGS=	--prefix=${PREFIX} --sysconfdir=${PREFIX}/etc/leafnode \
		--with-spooldir=${LEAFNODE_SPOOLDIR} --with-ipv6
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
MAKE_ARGS=
PKGMESSAGE=	${WRKSRC}/pkg-message

MAN1=		leafnode-version.1 newsq.1
MAN8=		applyfilter.8 checkgroups.8 fetchnews.8 leafnode.8 texpire.8
MANLANG=	"" de.ISO8859-1
MAN1DIR_DE=	${MAN1PREFIX}/man/de.ISO8859-1/man1
MAN8DIR_DE=	${MAN8PREFIX}/man/de.ISO8859-1/man8

DOCS=		ADD-ONS ChangeLog COPYING CREDITS FAQ.txt FAQ.pdf FAQ.html \
		INSTALL NEWS README ChangeLog.old README-FQDN README-FQDN.html \
		README-daemontools README.FIRST TODO leafnode.cron.daily \
		leafnode-SA-2002-01 leafnode-SA-2003-01 leafnode-SA-2004-01 KNOWNBUGS
DOCS_DE=	INSTALL_de LIESMICH-daemontools README README_de

.if !defined(NOPORTDOCS)
PORTDOCS=	*
.endif

pre-configure:
	@${ECHO_MSG}
	@${ECHO_MSG} "------------------------------------------------------------------------"
	@${ECHO_MSG} "This port will use ${LEAFNODE_SPOOLDIR} as spool directory."
	@${ECHO_MSG} "Use LEAFNODE_SPOOLDIR=d to specify d as spool directory."
	@${ECHO_MSG} "------------------------------------------------------------------------"
	@${ECHO_MSG}

post-install:
	${INSTALL_SCRIPT} ${WRKSRC}/setup-daemontools.sh ${PREFIX}/sbin/
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
	${MKDIR} ${DOCSDIR}/german
	cd ${WRKSRC}/doc_german && ${INSTALL_DATA} ${DOCS_DE} ${DOCSDIR}/german
.endif
	${MKDIR} ${MAN1DIR_DE} ${MAN8DIR_DE}
	cd ${WRKSRC}/doc_german && \
	${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/de.ISO8859-1/man1 && \
	${INSTALL_MAN} ${MAN8} ${MAN8PREFIX}/man/de.ISO8859-1/man8
	@${SED} 's:%%DOCSDIR%%:${DOCSDIR}:g' ${FILESDIR}/pkg-message.in >${PKGMESSAGE}
	PKG_PREFIX=${PREFIX} SPOOLDIR=${LEAFNODE_SPOOLDIR} \
		${SH} pkg-install ${PORTNAME} POST-INSTALL
	${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud