summaryrefslogtreecommitdiffstats
path: root/news/tin/Makefile
blob: fe16e9c66b730e398eaa92a675b15dbd14f932bc (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
# New ports collection makefile for:	tin
# Date created:		25 July 1996
# Whom:			obrien@cs.ucdavis.edu
#
# $FreeBSD$
#

PORTNAME=	tin
PORTVERSION=    1.5.9
CATEGORIES+=	news
MASTER_SITES=	ftp://ftp.tin.org/pub/news/clients/tin/v1.5/ \
		ftp://nuxi.ucdavis.edu/pub/tin/v1.5/ \
		ftp://ftp.nuxi.com/pub/tin/v1.5/

MAINTAINER?=    ache@FreeBSD.org

LIB_DEPENDS=	uu.1:${PORTSDIR}/converters/uulib \
		intl.1:${PORTSDIR}/devel/gettext

USE_BZIP2=	yes
USE_GMAKE=	yes
GNU_CONFIGURE=	yes

CONFIGURE_ARGS=	--with-nntp-default-server=news \
		--with-spooldir=/var/news \
		--with-libdir=${PREFIX}/news/lib \
		--with-defaults-dir=${PREFIX}/etc \
		--with-editor=/usr/bin/ee \
		--enable-nls \
		--enable-curses \
		--with-ncurses \
		--with-mime-default-charset=ISO-8859-1 \
		--enable-forgery \
		--enable-break-long-lines \
		--with-pgp=${PREFIX}/bin/pgp \
		--with-ispell=${PREFIX}/bin/ispell \
		--with-metamail=${PREFIX}/bin/metamail
CONFIGURE_ENV=  CFLAGS='${CFLAGS} -DNNTP_SERVER_FILE="\"${PREFIX}/etc/nntpserver\""' \
		CPPFLAGS='${CPPFLAGS} -I${LOCALBASE}/include' \
		LDFLAGS='${LDFLAGS} -L${LOCALBASE}/lib'
ALL_TARGET=	build
MAN1=		tin.1

.if defined(WITH_TIN_NNTP_ONLY)
CONFIGURE_ARGS+=	--enable-nntp-only
.endif

post-patch:
	@${MV} ${WRKSRC}/doc/tin.1 ${WRKSRC}/doc/tin.1.dist
	@${SED} -e 's:/var/spool/news:/var/news:' \
		-e 's:/etc/nntpserver:${PREFIX}/etc/nntpserver:' \
		-e 's:/usr/lib/news:${PREFIX}/news/lib:' \
		<${WRKSRC}/doc/tin.1.dist >${WRKSRC}/doc/tin.1

pre-configure:
	${CP} ${FILESDIR}/pcre.h ${WRKSRC}/pcre

post-build:
	cd ${WRKSRC}/po; gmake

post-install:
	cd ${WRKSRC}/doc; ${INSTALL_DATA} tin.defaults ${PREFIX}/etc/tin.defaults.dist
	if [ ! -f ${PREFIX}/etc/tin.defaults ] ; then \
		${CP} ${PREFIX}/etc/tin.defaults.dist ${PREFIX}/etc/tin.defaults; \
	fi
	cd ${WRKSRC}/doc; ${INSTALL_DATA} mime.types ${PREFIX}/etc/tin.mime.types.dist
	if [ ! -f ${PREFIX}/etc/mime.types ] ; then \
		${CP} ${PREFIX}/etc/tin.mime.types.dist ${PREFIX}/etc/mime.types; \
	fi

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