summaryrefslogtreecommitdiff
path: root/inputmethod/canna-server/Makefile
blob: 8c9fba44496cb7cf6dee14b6232a4981202854a3 (plain)
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
# $NetBSD: Makefile,v 1.23 2013/07/12 10:44:55 jperkin Exp $

PKGREVISION=	5
CANNA_MODULE=	server

.include "../../inputmethod/canna/Makefile.common"

PKG_DESTDIR_SUPPORT=	destdir

INSTALL_TARGET=	instserver

MESSAGE_SUBST+=	CANNA_USER=${CANNA_USER}
MESSAGE_SUBST+=	CANNA_GROUP=${CANNA_GROUP}

PKG_GROUPS=	${CANNA_GROUP}
PKG_USERS=	${CANNA_USER}:${CANNA_GROUP}

MAKE_DIRS+=		${IMDICTDIR}
OWN_DIRS+=		${IMDICTDIR}/canna
OWN_DIRS+=		${IMDICTDIR}/canna/canna
OWN_DIRS_PERMS+=	${CANNA_SPOOL}					\
			${CANNA_USER} ${CANNA_GROUP} ${CANNA_MODE}

RCD_SCRIPTS=	canna

.include "../../inputmethod/canna-lib/buildlink3.mk"

post-patch:
	${MV} ${WRKSRC}/Imakefile ${WRKSRC}/Imakefile.orig
	${SED} -e 's|\(SUBDIRS = \).*|\1 canna lib server cmd doc|' \
		-e 's|\(SERVERDIR = \).*|\1 server cmd doc|' \
		${WRKSRC}/Imakefile.orig > ${WRKSRC}/Imakefile
	${MV} ${WRKSRC}/Canna.conf ${WRKSRC}/Canna.conf.orig
	${SED} -e 's|\(DicDir.*=\).*|\1${IMDICTDIR}/canna|' \
		${WRKSRC}/Canna.conf.orig > ${WRKSRC}/Canna.conf

.include "../../mk/bsd.pkg.mk"