summaryrefslogtreecommitdiff
path: root/news/nntpclnt/Makefile
blob: da4743572e87ddc3649f76e88733b7571c268baf (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
# $NetBSD: Makefile,v 1.37 2012/10/08 12:27:41 asau Exp $

DISTNAME=	nntpclnt-1.6.1
PKGREVISION=	6
CATEGORIES=	news
MASTER_SITES=	http://ftp.sunet.se/pub/news/nntp/

MAINTAINER=	pkgsrc-users@NetBSD.org
COMMENT=	NNTP client library and inews client posting program
LICENSE=	nntpclnt-license

RESTRICTED=	Do not sell, rent, trade, market, or use for monetary profit
# No permission granted for derivative works.
NO_BIN_ON_FTP=	${RESTRICTED}
NO_SRC_ON_CDROM=${RESTRICTED}
NO_BIN_ON_CDROM=${RESTRICTED}

CONFLICTS+=	inn-[0-9]*

BUILD_TARGET=	inews
PKG_GROUPS=	news
PKG_SYSCONFSUBDIR=	nntp

PLIST_SUBST+=	PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}

.include "../../mk/bsd.prefs.mk"

CONFIG_SH=	${FILESDIR}/config.${OPSYS}.sh
ONLY_FOR_PLATFORM=	NetBSD-*-* SunOS-*-* DragonFly-*-* Linux-*-* Darwin-*-*

INSTALLATION_DIRS=	bin include lib ${PKGMANDIR}/man3

do-configure:
	${SED} -e s,@PREFIX@,${PREFIX}, -e s,@PKGSYSCONFDIR@,${PKG_SYSCONFDIR}, \
		${CONFIG_SH} >${WRKSRC}/config.sh
	@cd ${WRKSRC} && ${SH} Makefile.SH && ${SH} config.h.SH

post-build:
	cd ${WRKSRC} && \
		${AR} clq libnntpclnt.a nntpclnt.o && ${RANLIB} libnntpclnt.a

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/inews ${DESTDIR}${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/nntp.h ${DESTDIR}${PREFIX}/include/
	${INSTALL_DATA} ${WRKSRC}/libnntpclnt.a ${DESTDIR}${PREFIX}/lib/
	${INSTALL_DATA} ${WRKSRC}/nntpclnt.3 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man3/

SPECIAL_PERMS+=	bin/inews ${REAL_ROOT_USER} ${PKG_GROUPS} 2555

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