summaryrefslogtreecommitdiff
path: root/inputmethod/sj3-server/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'inputmethod/sj3-server/Makefile')
-rw-r--r--inputmethod/sj3-server/Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/inputmethod/sj3-server/Makefile b/inputmethod/sj3-server/Makefile
new file mode 100644
index 00000000000..a8834d1ab72
--- /dev/null
+++ b/inputmethod/sj3-server/Makefile
@@ -0,0 +1,62 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/05/31 13:01:13 seb Exp $
+#
+
+DISTNAME= sj3-2.0.1.20
+PKGNAME= sj3-server-2.0.1.20
+CATEGORIES= japanese inputmethod
+MASTER_SITES= ftp://ftp.sony.co.jp/pub/unsupported/src/ \
+ ftp://ftp.cs.titech.ac.jp/pub/japanese/sj3/
+
+MAINTAINER= tech-pkg-ja@jp.netbsd.org
+COMMENT= Japanese input method (server)
+
+DEPENDS+= sj3-lib-2.0.1.20:../../inputmethod/sj3-lib
+
+FILESDIR= ${.CURDIR}/../../inputmethod/sj3-lib/files
+PATCHDIR= ${.CURDIR}/../../inputmethod/sj3-lib/patches
+
+.include "../../mk/bsd.prefs.mk"
+SJ3OWNER?= daemon
+SJ3GROUP?= daemon
+DICT_DIR?= /var/dict
+MAKE_ENV+= SJ3OWNER=${SJ3OWNER} SJ3GROUP=${SJ3GROUP} DICT_DIR=${DICT_DIR} \
+ LOCAL_LDFLAGS="${LDFLAGS}"
+PLIST_SUBST= SJ3OWNER=${SJ3OWNER} SJ3GROUP=${SJ3GROUP} DICT_DIR=${DICT_DIR} \
+ PREFIX=${PREFIX}
+
+INSTALL_SRC= ${PKGDIR}/INSTALL
+INSTALL_FILE= ${WRKDIR}/INSTALL
+
+STARTUP_SCRIPT= etc/rc.d/sj3
+STARTUP_SCRIPT_SRC=${WRKDIR}/STARTUP
+
+pre-configure:
+ @${MV} ${WRKSRC}/Imakefile ${WRKSRC}/Imakefile.orig
+ @${SED} -e 's|\(SUBDIRS = .*\)sj3lib \(.*\)|\1\2|' \
+ ${WRKSRC}/Imakefile.orig > ${WRKSRC}/Imakefile
+ @for file in `${FIND} ${WRKSRC} -name Imakefile`; do \
+ ${MV} -f $$file $$file.orig; \
+ ${SED} -e 's|\(= \).*/lib\(sj3lib\).a|\1-l\2|' \
+ $$file.orig > $$file; \
+ done
+
+do-configure:
+ @(cd ${WRKSRC}; ${X11BASE}/bin/xmkmf; ${MAKE} Makefiles)
+
+post-build:
+ @${ECHO} '#!/bin/sh' > ${STARTUP_SCRIPT_SRC}
+ @${ECHO} 'sj3=${PREFIX}/bin/sj3serv' >> ${STARTUP_SCRIPT_SRC}
+ @${ECHO} 'if [ -f $$sj3 ]; then' >> ${STARTUP_SCRIPT_SRC}
+ @${ECHO} " echo -n ' sj3'" >> ${STARTUP_SCRIPT_SRC}
+ @${ECHO} ' $$sj3' >> ${STARTUP_SCRIPT_SRC}
+ @${ECHO} 'fi' >> ${STARTUP_SCRIPT_SRC}
+ @${SED} -e 's|$${SJ3OWNER}|${SJ3OWNER}|' \
+ -e 's|$${SJ3GROUP}|${SJ3GROUP}|' \
+ -e 's|$${DICT_DIR}|${DICT_DIR}|' \
+ -e 's|$${PREFIX}|${PREFIX}|' \
+ ${INSTALL_SRC} > ${INSTALL_FILE}
+
+post-install:
+ @${INSTALL_SCRIPT} ${STARTUP_SCRIPT_SRC} ${PREFIX}/${STARTUP_SCRIPT}
+
+.include "../../mk/bsd.pkg.mk"