summaryrefslogtreecommitdiff
path: root/japanese/namazu1/Makefile
blob: 71ad011d7a625bc433f7bb10f69103c98c316a76 (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
# $NetBSD: Makefile,v 1.6 2001/02/25 04:17:54 hubertf Exp $
# FreeBSD Id: Makefile,v 1.1.1.1 1999/03/31 11:52:07 flathill Exp $

DISTNAME=	namazu-1.3.0.11
PKGNAME=	namazu-1.3.0.11nb1
CATEGORIES=	japanese textproc
MASTER_SITES=	http://www.namazu.org/stable/

MAINTAINER=	tech-pkg-ja@jp.netbsd.org
HOMEPAGE=	http://www.namazu.org/index.html.en
COMMENT=	Namazu is a search engine software intended for easy use

DEPENDS=	kakasi>=2.3.1:../../japanese/kakasi
DEPENDS+=	nkf-1.7:../../japanese/nkf
.if !defined(WITH_CHASEN) || ${WITH_CHASEN} != NO
DEPENDS+=	p5-Text-ChaSen>=1.0:../../japanese/p5-Text-ChaSen
.endif

CONFIGURE_ARGS+=	--with-cgi-dir=${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_PERL5=	yes
GNU_CONFIGURE=	yes

CONFLICTS+=	namazu-*

WRKSRC=		${WRKDIR}/${DISTNAME}/src
CONTRIBDIR=	${WRKDIR}/${DISTNAME}/contrib

CONFDIR=	${LOCALBASE}/etc/namazu
DOCDIR=		${LOCALBASE}/share/namazu/doc
INDEXDIR=	${LOCALBASE}/libdata/namazu

post-build:
	@${SED} -e 's|/usr/bin/perl|${LOCALBASE}/bin/perl|g' \
		< ${CONTRIBDIR}/bnamazu > ${WRKDIR}/bnamazu
	@for FILE in \
		${PKGDIR}/DEINSTALL	\
		${PKGDIR}/INSTALL;	\
	do \
		${SED}	-e 's|@CONFDIR@|${CONFDIR}|g' \
			-e 's|@INDEXDIR@|${INDEXDIR}|g' \
			-e 's|@DOCDIR@|${DOCDIR}|g' \
			< $${FILE} > ${WRKDIR}/`basename $${FILE}`; \
	done

post-install:
	@cd ${WRKSRC}; ${MAKE} install_cgi
	@${INSTALL_SCRIPT} ${WRKDIR}/bnamazu ${LOCALBASE}/bin
	@${TEST} -d ${LOCALBASE}/etc/namazu || ${INSTALL_DATA_DIR} ${LOCALBASE}/etc/namazu
	@${SH} ${WRKDIR}/INSTALL ${PKGNAME} POST-INSTALL

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