summaryrefslogtreecommitdiff
path: root/japanese/Wnn6/Makefile
blob: ec245c64eba2eb0ac390cdc8f979a5166ef4dc79 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# New ports collection makefile for:	Wnn6
# Date created:		15 July 1997
# Whom:			Satoshi Taoka <taoka@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	Wnn6
PORTVERSION=	97.6.6
CATEGORIES=	japanese
DISTNAME=	OMRONWnn6
EXTRACT_SUFX=	.tgz

MAINTAINER=	taoka@FreeBSD.org
COMMENT=	A Japanese input method (this is not free)

IGNOREFILES=	${DISTFILES}
NO_WRKSUBDIR=	yes
LIBDIR=		${PREFIX}/OMRONWnn6
DISTDIR=	${MOUNT_PT}/fbsd
MOUNT_PT?=	/cdrom
MOUNT_DEV?=	/dev/acd0c

RESTRICTED=	"You should buy from Omron Software Co., Ltd."
NO_CDROM=	"You should buy from Omron Software Co., Ltd."
NO_BUILD=	yes
IS_INTERACTIVE=	yes

do-fetch:
	@${DO_NADA}
fetch-list:
	@${DO_NADA}

# If ${.CURDIR}/work/.build_done (which will be ${BUILD_COOKIE}) exists,
# we do nothing in a 'do-fetch' stage.
.if !exists(${.CURDIR}/work/.build_done)
pre-extract::
	@${ECHO} "Please set the CD-ROM 'Wnn6 for Linux/FreeBSD -- 97.6.6'";
	@${ECHO} "  (it is an early version !!)";
	@${ECHO} -n "into your cdrom-drive. (Press Return)"; \
	read dummy; \
	${ECHO} "By default, a mount point and a device file"; \
	${ECHO} "    are '${MOUNT_PT}' and '${MOUNT_DEV}' respectively."; \
	${ECHO} -n "Are these correct? (y/n) [y]"; \
	(read ans; \
	case x$${ans} in \
	  xn*|xN*) \
		${ECHO} "###########################################################"; \
		${ECHO} "Please run 'make' in specifying MOUNT_PT and MOUNT_DEV"; \
		${ECHO} "For example:"; \
		${ECHO} "	make MOUNT_PT=/mnt MOUNT_DEV=/dev/cd0c"; \
		${ECHO} "###########################################################"; \
		${FALSE}; \
		;; \
	  *) \
		${ECHO} "Now mounting the CD-ROM ..."; \
		;; \
	esac)
	@for t in `mount | ${GREP} ${MOUNT_PT}`; do \
	  if [ x"$$t" = x"${MOUNT_PT}" ]; then \
	    ${ECHO} "##################################################"; \
	    ${ECHO} "${MOUNT_PT} is busy"; \
	    ${ECHO} "Please 'umount ${MOUNT_PT}'"; \
	    ${ECHO} "##################################################"; \
	    ${FALSE}; \
	  fi; \
	done
	@/sbin/mount_cd9660 ${MOUNT_DEV} ${MOUNT_PT}
.endif

pre-extract::
	@if [ ! -e ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
		${ECHO} ""; \
		${ECHO} "${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}: No such file"; \
		${ECHO} "Perhaps the CD-ROM is not 'Wnn6 for Linux/FreeBSD'"; \
		${ECHO} "!! Note that 'Wnn6 for Linux/FreeBSD' is an old version !!"; \
		/sbin/umount ${MOUNT_PT}; \
		${ECHO} "Umounting is done ..."; \
		${FALSE}; \
	fi

post-extract:
	@/sbin/umount ${MOUNT_PT}

pre-install:
	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL

do-install:
	@cd ${WRKSRC}/usr; tar cf - OMRONWnn6 | (cd ${PREFIX}; tar xvpf -)

post-install:
	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL

.include <bsd.port.mk>