aboutsummaryrefslogtreecommitdiffstats
path: root/news/diablo/Makefile
blob: ac8bbf89190b1436c185d983b6cdd208035d977c (plain) (blame)
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
# Created by: James FitzGibbon <jfitz@FreeBSD.org>
# $FreeBSD$

PORTNAME=   diablo
PORTVERSION=    5.1
PORTREVISION=   2
CATEGORIES= news
MASTER_SITES=   http://www.openusenet.org/diablo/download/
DISTNAME=   ${PORTNAME}-${PORTVERSION}-REL

MAINTAINER= lifanov@mail.lifanov.com
COMMENT=    Comprehensive newsfeeding and newsreading software package

LICENSE=    BSD3CLAUSE

BUILD_DEPENDS=  xmake:${PORTSDIR}/devel/xmake

PORTDOCS=   COPYRIGHT INSTALL README.READER README.SERVER RELEASE_NOTES

OPTIONS_DEFINE= DES DOCS
DES_DESC=   DES encryption support

USES=       tar:tgz

post-patch:
    @${CP} ${FILESDIR}/diablo.in ${WRKDIR}/diablo
    @${REINPLACE_CMD} -E 's|%%PREFIX%%|${STAGEDIR}${PREFIX}|g ;\
        s|-g -O.?|${CFLAGS}| ; s|g?cc|${CC}|' \
        ${WRKSRC}/XMakefile.inc
    @${REINPLACE_CMD} -E 's|%%PREFIX%%|${PREFIX}|g' \
        ${WRKDIR}/diablo ${WRKSRC}/XMakefile.inst
# Fix for GCC 4.2
    @${REINPLACE_CMD} -e 's|VServerConfig\[\]|*VServerConfig|' \
        ${WRKSRC}/dreaderd/main.c

post-patch-DES-off:
    @${REINPLACE_CMD} -e 's| -ldes||g' ${WRKSRC}/XMakefile.inc

do-build:
    (cd ${WRKSRC} && xmake all)

do-install:
    ${MKDIR} ${STAGEDIR}${PREFIX}/news/dbin
    ${MKDIR} ${STAGEDIR}${PREFIX}/news/dqueue
    ${MKDIR} ${STAGEDIR}${PREFIX}/news/spool
    ${MKDIR} ${STAGEDIR}${PREFIX}/news/spool/news
    ${MKDIR} ${STAGEDIR}${PREFIX}/news/spool/cache
    ${MKDIR} ${STAGEDIR}${PREFIX}/news/spool/group
    ${MKDIR} ${STAGEDIR}${PREFIX}/news/spool/postq
    (cd ${WRKSRC} && xmake install)
    @${RM} -rf ${STAGEDIR}${PREFIX}/news/man
    @${STRIP_CMD} ${STAGEDIR}${PREFIX}/news/dbin/*
    ${INSTALL_SCRIPT} ${WRKDIR}/diablo ${STAGEDIR}${PREFIX}/etc/rc.d

do-install-DOCS-on:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
.for file in ${PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
.endfor

.include <bsd.port.mk>