summaryrefslogtreecommitdiff
path: root/japanese/mypaedia-fpw/Makefile
blob: 7bfca92a718d67196e96f58c23acbec1c8995715 (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
# Created by: Satoshi Taoka <taoka@FreeBSD.org>
# $FreeBSD$

PORTNAME=	mypaedia-fpw
PORTVERSION=	1.4.3
PORTREVISION=	2
CATEGORIES=	japanese
MASTER_SITES=	http://openlab.ring.gr.jp/edict/fpw/dist/mypaedia/
DISTNAME=	mypaedia-fpw${PORTVERSION}-src

MAINTAINER=	ports@FreeBSD.org
COMMENT=	An encyclopedia  "Mypaedia" (EPWING V1 format)

BUILD_DEPENDS=	fpwmake:${PORTSDIR}/japanese/freepwing \
		ja-p5-Jcode>=0:${PORTSDIR}/japanese/p5-Jcode

IS_INTERACTIVE= YES
RESTRICTED=	The original dictionary is not free
USES=		perl5
WRKSRC=		${WRKDIR}/mypaedia-fpw${PORTVERSION}
DICT_PATH?=	/cdrom

NO_STAGE=	yes
post-extract:
	@if [ ! -f ${DICT_PATH}/INDEX/ITEM.DAT ]; then \
	  ${ECHO} "###################################################"; \
	  ${ECHO} "Specify a mount point for Mypaedia's CD-ROM"; \
	  ${ECHO} "and excecute the following command again:"; \
	  ${ECHO} "  make DICT_PATH=${DICT_PATH}"; \
	  ${ECHO} "###################################################"; \
	  ${FALSE}; \
	fi

do-build:
#	cd ${WRKSRC}; fpwmake SRCDIR=${DICT_PATH} > /dev/null; \
	cd ${WRKSRC}; fpwmake SRCDIR=${DICT_PATH}; \
	fpwmake catalogs

do-install:
	${MKDIR} ${PREFIX}/share/dict/mypaedia-fpw/mypaedia/data
	${MKDIR} ${PREFIX}/share/dict/mypaedia-fpw/mypaedia/gaiji
	${INSTALL_DATA} ${WRKSRC}/honmon \
		${PREFIX}/share/dict/mypaedia-fpw/mypaedia/data
	${INSTALL_DATA} ${WRKSRC}/gai16f \
		${PREFIX}/share/dict/mypaedia-fpw/mypaedia/gaiji
	${INSTALL_DATA} ${WRKSRC}/gai16h \
		${PREFIX}/share/dict/mypaedia-fpw/mypaedia/gaiji
	${INSTALL_DATA} ${WRKSRC}/catalogs ${PREFIX}/share/dict/mypaedia-fpw
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
.for file in AUTHORS COPYING ChangeLog GAIJI.TXT MYPAEDIA-format.txt README.PKG README.TXT TOBEDONE
	${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>