aboutsummaryrefslogtreecommitdiff
path: root/japanese/rskkserv/Makefile
blob: ce90c556e9a2c4e910e186495fcd33d6254337c8 (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
# New ports collection makefile for:	rskkserv
# Date created:		18 Aug 2000
# Whom:                 Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#

PORTNAME=	rskkserv
PORTVERSION=	2.91.1
CATEGORIES=	japanese ruby
MASTER_SITES=	http://www.unixuser.org/~ysjj/rskkserv/
DIST_SUBDIR=	ruby

MAINTAINER=	knu@FreeBSD.org

RUN_DEPENDS=	${RUBY_SITEARCHLIBDIR}/tcpwrap.so:${PORTSDIR}/security/ruby-tcpwrap \
		${LOCALBASE}/share/skk/${SKKJISYO}:${SKK_MASTERDIR}

USE_RUBY=	yes

SKKJISYO_SIZE?=	L
SKKJISYO?=	SKK-JISYO.${SKKJISYO_SIZE}
SKK_MASTERDIR=	${PORTSDIR}/japanese/skk-jisyo

STARTUP_SCRIPT=	${PREFIX}/etc/rc.d/rskkserv.sh
MAKE_ARGS=	prefix="${PREFIX}" \
		skkdicsize="${SKKJISYO_SIZE}" \
		epwdicbase="${PREFIX}/share/dict" \
		skkdicbase="${PREFIX}/share/skk" \
		SKKSERV=rskkserv

DOCS_EN=	ChangeLog
DOCS_JA=	README		TODO

pre-patch:
	${CP} ${WRKSRC}/rskkserv.conf.sample ${WRKSRC}/rskkserv.conf.in

post-install:
	${CP} -R ${WRKSRC}/skkserv ${RUBY_SITELIBDIR}/
	@if [ ! -f ${STARTUP_SCRIPT} ]; then \
		${ECHO} "Installing ${STARTUP_SCRIPT} file."; \
		${ECHO} "#!/bin/sh" > ${STARTUP_SCRIPT}; \
		${ECHO} 'case $$1 in' >> ${STARTUP_SCRIPT}; \
		${ECHO} "start)" >> ${STARTUP_SCRIPT}; \
		${ECHO} "	if [ -f ${PREFIX}/libexec/rskkserv ]; then" >> \
			${STARTUP_SCRIPT}; \
		${ECHO} "		${ECHO} -n ' rskkserv'; ${PREFIX}/libexec/rskkserv" >> \
			${STARTUP_SCRIPT}; \
		${ECHO} "	fi" >> ${STARTUP_SCRIPT}; \
		${ECHO} "	;;" >> ${STARTUP_SCRIPT}; \
		${ECHO} "stop)" >> ${STARTUP_SCRIPT}; \
		${ECHO} "	;;" >> ${STARTUP_SCRIPT}; \
		${ECHO} "*)" >> ${STARTUP_SCRIPT}; \
		${ECHO} '	${ECHO} "usage: $$0 {start|stop}" 1>&2' >> ${STARTUP_SCRIPT}; \
		${ECHO} "	;;" >> ${STARTUP_SCRIPT}; \
		${ECHO} 'esac' >> ${STARTUP_SCRIPT}; \
		${CHMOD} ${BINMODE} ${STARTUP_SCRIPT}; \
	fi
.if !defined(NOPORTDOCS)
	${MKDIR} ${RUBY_DOCDIR}/rskkserv/ja
.for f in ${DOCS_EN}
	${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/rskkserv/
.endfor
.for f in ${DOCS_JA}
	${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/rskkserv/ja/
.endfor
.endif

.include <bsd.port.mk>