aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/kon2-16dot/Makefile
blob: cdd2d1633691f6fd11dfbf3750fd8d62167f5f8d (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
# New ports collection makefile for:    kon2 with 16dot font
# Date created:         11 Apr 1997
# Whom:                 Makoto Matsushita <matusita@jp.freebsd.org>
#
# $FreeBSD$
#

PORTNAME=   kon2
PORTVERSION=    0.3
PORTREVISION=   2
PKGNAMESUFFIX=  -${KONFONT}
CATEGORIES+=    japanese # '+=' is for slave ports
# note kon is only in first directory and fonts are only in second directory
MASTER_SITES=   ftp://ftp.tut.ac.jp/Linux/Packages/Utils/ \
        ${MASTER_SITE_PORTS_JP} \
        ftp://ftp.xfree86.org/pub/XFree86/3.3.3/untarred/xc/fonts/bdf/misc/ \
        ftp://ftp.iij.ad.jp/pub/X/XFree86/3.3.3/untarred/xc/fonts/bdf/misc/
DISTNAME=   kon2-${PORTVERSION}
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} \
        k14.bdf 7x14rk.bdf \
        jiskan16.bdf 8x16rk.bdf

MAINTAINER?=    shige@FreeBSD.org # '+=' is for slave ports
COMMENT=    Kanji On Console -- Display kanji characters on your own console

ONLY_FOR_ARCHS= i386

MAN1=       kon.1
MANLANG=    ja
EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}

DOCDIR=     ${PREFIX}/share/doc/kon2

.if !defined(KONFONT)
KONFONT=16dot
KON16FONT=Startup
.elif (${KONFONT} == "14dot")
KON14FONT=Startup
.elif (${KONFONT} != "16dot")
.BEGIN:
    @${ECHO} "Error: \$${KONFONT} (\"${KONFONT}\") should be either \"14dot\" or \"16dot\"."
    @${FALSE}
.endif

pre-build:
    ${SED} -e 's,%%PREFIX%%,${PREFIX},' \
      -e 's,%%DISTDIR%%,${DISTDIR},' \
      ${FILESDIR}/dotconfig > ${WRKSRC}/.config
    @(cd ${WRKSRC}; ${MAKE} -f Makefile.FreeBSD config)
    @for i in kon.cfg.FreeBSD doc/kon.1; do\
        ${MV} -f ${WRKSRC}/$${i} ${WRKSRC}/$${i}.in ;\
        ${SED} -e "s;@@PREFIX@@;${PREFIX};g" -e "s;@@KON16FONT@@;${KON16FONT};g" -e "s;@@KON14FONT@@;${KON14FONT};g" ${WRKSRC}/$${i}.in > ${WRKSRC}/$${i} ;\
    done

post-install:
    @${INSTALL_MAN} ${WRKSRC}/doc/kon.1 ${PREFIX}/man/ja/man1
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCDIR}
    @${INSTALL_DATA} ${WRKSRC}/doc/README ${WRKSRC}/doc/README.FreeBSD \
        ${DOCDIR}
.endif

.include <bsd.port.mk>