aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/mnews/Makefile
blob: 32da5ac685f4305a4088e36a9b1bb3f2eef1e6e5 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# New ports collection makefile for:    mnews
# Date created:         23 Sep 1996
# Whom:             Masafumi NAKANE <max@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   mnews
PORTVERSION=    1.22
CATEGORIES= japanese news ipv6
MASTER_SITES=   ftp://ftp.leo.chubu.ac.jp/pub/network/mnews/
DISTNAME=   mnews${PORTVERSION:S/.//}

MAINTAINER= seiken@ARGV.AC

FORBIDDEN=  "Remotely exploitable buffer overflows. http://online.securityfocus.com/archive/1/275012"

WRKSRC=     ${WRKDIR}/mnews-${PORTVERSION}/build
MAN1=       mnews.1
MANLANG=    ja

DOCS=       FAQ.doc IPv6.doc IPv6_en.doc board.doc gnspool.doc mnews.doc \
        prerel.doc present.doc read1ST.doc readme.doc update.doc \
        year2000.doc youbin.doc
SAMPLES=    _mnews.smp jnames.fj jnames.jp jnames.smp jnames.tnn

GNSPOOL?=   0
IMPUT?=     0

.include <bsd.port.pre.mk>

.if ${OSVERSION} >= 400014
MAKE_ENV+=  USE_INET6=yes
.endif

do-configure:
.for f in Makefile site_dep.h
    ${SED} -e s+@PREFIX@+${PREFIX}+ \
        -e s+@GNSPOOL@+${GNSPOOL}+ \
        -e s+@IMPUT@+${IMPUT}+ \
        ${FILESDIR}/${f}.in > ${WRKSRC}/${f}
.endfor

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/mnews ${PREFIX}/bin
    ${MKDIR} ${PREFIX}/etc/mnews
    ${INSTALL_DATA} ${WRKSRC}/../etc/jnames.fj ${PREFIX}/etc/mnews/jnames.default
.if !exists(${PREFIX}/etc/mnews/jnames)
    ${INSTALL_DATA} ${WRKSRC}/../etc/jnames.fj ${PREFIX}/etc/mnews/jnames
.endif
    ${MKDIR} ${PREFIX}/share/examples/mnews
.for f in ${SAMPLES}
    ${INSTALL_DATA} ${WRKSRC}/../etc/${f} ${PREFIX}/share/examples/mnews
.endfor
    ${INSTALL_MAN} ${WRKSRC}/../doc/mnews.1 ${PREFIX}/man/ja/man1
.if !defined(NOPORTDOCS)
    ${MKDIR} ${PREFIX}/share/doc/mnews
.for f in ${DOCS}
    ${INSTALL_DATA} ${WRKSRC}/../doc/${f} ${PREFIX}/share/doc/mnews
.endfor
.endif

post-install:
    @${ECHO_CMD} my.domain.com > ${PREFIX}/etc/mnews/default-domain.default
    @if [ \! -e ${PREFIX}/etc/mnews/default-domain ]; then \
    if [ X${BATCH} = X ]; then \
        while [ X$$domain = X ]; do \
            read -p "Enter the domain name of this host>" domain; \
        done; \
        ${ECHO_CMD} $$domain > ${PREFIX}/etc/mnews/default-domain; \
    else \
        ${ECHO} "Now, you need to make sure ${PREFIX}/etc/mnews/default-domain"; \
        ${ECHO} "contains correct domain name."; \
        ${CP} ${PREFIX}/etc/mnews/default-domain.default ${PREFIX}/etc/mnews/default-domain; \
    fi \
    fi
    @${ECHO} "Please refer to the files in:"
    @${ECHO} "${PREFIX}/share/doc/mnews & ${PREFIX}/share/examples/mnews."

.include <bsd.port.post.mk>