summaryrefslogtreecommitdiff
path: root/textproc/dict-dictionaries/Makefile
blob: 9ee25daa848ccebb692fd050c4ce1cf53f1fc382 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# $NetBSD: Makefile,v 1.2 2004/01/24 15:13:19 grant Exp $

DISTNAME=       #
PKGNAME=	dict-data-1.8.0
CATEGORIES=	textproc
MASTER_SITES=	ftp://ftp.dict.org/pub/dict/
#MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=/dict}
DISTFILES=	dict-gazetteer-1.3.tar.gz \
		dict-misc-1.5.tar.gz \
		dict-web1913-1.4.tar.gz \
		web1913-0.46-a.tar.gz \
		dict-wn-1.5.tar.gz

MAINTAINER=	mike@ethmoid.org
HOMEPAGE=	http://www.dict.org/
COMMENT=	Dictionary data for DICTD

DEPENDS=	dict-server>=1.8.0nb1:../../textproc/dict-server

USE_GNU_TOOLS+=	make

# Strip '.gz', strip '.tar'.
DICTIONARIES=	${DISTFILES:R:R}

LEXICONS=	easton.dict.dz \
		easton.index \
		elements.dict.dz \
		elements.index \
		foldoc.dict.dz \
		foldoc.index \
		hitchcock.dict.dz \
		hitchcock.index \
		jargon.dict.dz \
		jargon.index \
		world95.dict.dz \
		world95.index
GAZETTEER=	gazetteer.dict.dz \
		gazetteer.index
WEB1913=	web1913.dict.dz \
		web1913.index
WN=		wn.dict.dz \
		wn.index

do-configure:
	@for d in ${DICTIONARIES}; do \
		(cd ${WRKDIR}/$${d}; [ -f configure ] && ${SH} configure); \
	done

# Build dictinaries
do-build:
	@cd ${WRKDIR}/dict-web1913-1.4; ${MAKE_PROGRAM}		# For libmaa
	@${LN} -fs ${WRKDIR}/web1913-0.46-a ${WRKDIR}/dict-web1913-1.4/web1913
	@for d in ${DICTIONARIES}; do \
		(cd ${WRKDIR}/$$d; \
		    ${MAKE_PROGRAM} db); \
	done
	${FIND} ${WRKDIR} -name '*.dict' | \
	while read f; do \
		if [ ! -f $${f}.dz ]; then \
			${LOCALBASE}/bin/dictzip $$f; \
		fi; \
	done

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/share/dictd
	for f in ${LEXICONS}; do \
		${INSTALL_DATA} ${WRKDIR}/dict-misc-1.5/$$f \
		    ${PREFIX}/share/dictd; \
	done
	for f in ${GAZETTEER}; do \
		${INSTALL_DATA} ${WRKDIR}/dict-gazetteer-1.3/$$f \
		    ${PREFIX}/share/dictd; \
	done
	for f in ${WEB1913}; do \
		${INSTALL_DATA} ${WRKDIR}/dict-web1913-1.4/$$f \
		    ${PREFIX}/share/dictd; \
	done
	for f in ${WN}; do \
		${INSTALL_DATA} ${WRKDIR}/dict-wn-1.5/$$f \
		    ${PREFIX}/share/dictd; \
	done

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