summaryrefslogtreecommitdiff
path: root/inputmethod/dbskkd-cdb/Makefile
blob: aaf8bed1ec15473b7f82bbef4fd9d7070f2aea8d (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# $NetBSD: Makefile,v 1.3 2011/03/10 12:43:13 ryoon Exp $
#

DISTNAME=	dbskkd-cdb-2.00
PKGREVISION=	1
CATEGORIES=	inputmethod japanese
MASTER_SITES=	http://dbskkd-cdb.googlecode.com/files/

MAINTAINER=	ryoon@NetBSD.org
HOMEPAGE=	http://github.com/jj1bdx/dbskkd-cdb
COMMENT=	SKK dictionary server based on cdb
LICENSE=	gnu-gpl-v3

PKG_DESTDIR_SUPPORT=	user-destdir

DOCSDIR=		${PREFIX}/share/doc/${PKGBASE}
INSTALLATION_DIRS=	libexec \
			${DOCSDIR} \
			bin

DEPENDS=	skk-jisyo-cdb-[0-9]*:../../inputmethod/skk-jisyo-cdb

FIND_PREFIX:=	SKKJISYOCDBDIR=skk-jisyo-cdb

SUBST_CLASSES+=			fix-paths
SUBST_STAGE.fix-paths=		pre-configure
SUBST_MESSAGE.fix-paths=	fixing pathes
SUBST_FILES.fix-paths=		dbskkd-cdb.c
SUBST_SED.fix-paths=		-e 's,/usr/local/share/skk/SKK-JISYO.L.cdb,${SKKJISYOCDBDIR}/share/skk/SKK-JISYO.L.cdb,g'

CDBLIB=		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.tinycdb}/lib \
		-L${BUILDLINK_PREFIX.tinycdb}/lib -lcdb

MAKE_FLAGS+=		CDBLIB=${CDBLIB:Q}
MAKE_FLAGS+=		INSTALLDIR=${DESTDIR}${PREFIX}/libexec

INSTALL_DOCS=	CHANGES \
		LICENSE	\
		README \
		READMEJP \
		example-daemontools.txt \
		example-inetd.txt \
		skk-server-protocol.txt

INSTALL_SCRIPTS=	makeskkcdb.sh \
			skktocdbm.sh

post-install:
.for filename in ${INSTALL_DOCS}
	${INSTALL_DATA} ${WRKSRC}/${filename} ${DESTDIR}/${DOCSDIR}
.endfor
.for filename in ${INSTALL_SCRIPTS}
	${INSTALL_SCRIPT} ${WRKSRC}/${filename} ${DESTDIR}${DOCSDIR}
.endfor

.include "../../mk/find-prefix.mk"
.include "../../databases/tinycdb/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"