summaryrefslogtreecommitdiff
path: root/textproc/namazu2/Makefile
blob: 41aadd18703bc3c9d65df0a963c26aca09926935 (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
59
60
61
62
63
# $NetBSD: Makefile,v 1.11 2003/07/17 22:54:31 grant Exp $
# FreeBSD Id: ports/japanese/namazu2/Makefile,v 1.16 2000/10/26 20:56:25 knu Exp

DISTNAME=	namazu-2.0.12
PKGREVISION=	3
CATEGORIES=	japanese textproc www
MASTER_SITES=	ftp://ftp.namazu.org/namazu/stable/ \
		http://www.namazu.org/stable/

PATCH_SITES=	${MASTER_SITES}
PATCHFILES=	namazu-2.0.12-de.diff
PATCH_DIST_STRIP= -p1

MAINTAINER=	tech-pkg@NetBSD.org
HOMEPAGE=	http://www.namazu.org/index.html.en
COMMENT=	Full-text search system intended for easy use

DEPENDS+=	p5-File-MMagic>=1.09:../../misc/p5-File-MMagic
DEPENDS+=	p5-Text-Kakasi>=1.04:../../textproc/p5-Text-Kakasi
DEPENDS+=	p5-nkf>=1.7:../../converters/p5-nkf
.if !defined(WITH_CHASEN) || ${WITH_CHASEN} != NO
DEPENDS+=	p5-Text-ChaSen>=1.0:../../textproc/p5-Text-ChaSen
.endif

CONFIGURE_ARGS+=	--localstatedir=${LOCALBASE}/libdata \
			--libexecdir=${LOCALBASE}/libexec/cgi-bin
.if defined(WITH_CHASEN) && ${WITH_CHASEN} == NO
CONFIGURE_ARGS+=	-without-chasen
.else
CONFIGURE_ARGS+=	-with-chasen
.endif

DEINSTALL_FILE=		${WRKDIR}/DEINSTALL
INSTALL_FILE=		${WRKDIR}/INSTALL

USE_BUILDLINK2=		# defined
USE_PKGLOCALEDIR=	# defined
USE_PERL5=		# defined
GNU_CONFIGURE=		# defined
USE_LIBTOOL=		# defined
LTCONFIG_OVERRIDE=${WRKSRC}/ltconfig
TEST_TARGET=		check

CONFLICTS+=	namazu-[0-9]*

post-build:
	@for FILE in \
		${PKGDIR}/DEINSTALL	\
		${PKGDIR}/INSTALL;	\
	do \
		${SED}	-e 's|@CONFDIR@|${LOCALBASE}/etc/namazu|g' \
			-e 's|@DATADIR@|${LOCALBASE}/libdata/namazu|g' \
			-e 's|@EXAMPLEDIR@|${LOCALBASE}/share/namazu|g' \
			< $${FILE} > ${WRKDIR}/`basename $${FILE}`; \
	done

post-install:
	@${TEST} -d ${LOCALBASE}/etc/namazu || ${INSTALL_DATA_DIR} ${LOCALBASE}/etc/namazu
	@${SH} ${WRKDIR}/INSTALL ${PKGNAME} POST-INSTALL

.include "../../converters/libiconv/buildlink2.mk"
.include "../../devel/gettext-lib/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"