aboutsummaryrefslogtreecommitdiff
path: root/korean/stardict2-dict-kr/Makefile
blob: 0e338ea547aee518116b3faadf23429d80ca0608 (plain) (blame)
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
# Ports collection makefile for:	stardict-dict-korean
# Date created:				20 May 2007
# Whom:					Yinghong Liu <relaxbsd@gmail.com>
#
# $FreeBSD$
#

PORTNAME=	stardict2-dict-kr
PORTVERSION=	2.4.2
PORTREVISION=	1
CATEGORIES=	korean textproc
MASTER_SITES=	SF
MASTER_SITE_SUBDIR=	stardict
DIST_SUBDIR=	stardict

MAINTAINER=	relaxbsd@gmail.com
COMMENT=	Korean and foreign language Dictionaries for StarDict

RUN_DEPENDS=	stardict:${PORTSDIR}/textproc/stardict2

NO_BUILD=	yes
USE_BZIP2=	yes

LATEST_LINK=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}

DICTDIR=	share/stardict/dic

DICTIONARIES=	GPL_korean-russian-dic Hanja_KoreanHanzi_Dic KoreanAnimalMedicalDic \
		KoreanDic KoreanEnglishDic KoreanLawDic KoreanMedicalDic quick_eng-kor

.if !defined(DICT_PACK)
OPTIONS=	ALL "All dictionaries" on
.for dict in ${DICTIONARIES}
OPTIONS+=	${dict:U:S|-|_|g} "${dict} dictionary" off
.endfor
.endif

.include <bsd.port.pre.mk>

.for dict in ${DICTIONARIES}
.if defined(WITH_ALL) || defined(WITH_${dict:U:S|-|_|g})
INSTALL_DICTIONARIES+=	${dict}
.endif
.endfor

.for dict in ${INSTALL_DICTIONARIES}
DISTFILES+=	stardict-${dict}-${PORTVERSION}${EXTRACT_SUFX}
.endfor

do-build:
	@${DO_NADA}

do-install:
	${MKDIR} ${PREFIX}/${DICTDIR}
.for dict in ${INSTALL_DICTIONARIES}
	cd ${WRKDIR}/stardict-${dict}-${PORTVERSION}/ \
	&& ${INSTALL_DATA} * ${PREFIX}/${DICTDIR}/ \
	&& (${FIND} -s * -type f | \
	${SED} -e 's|^|${DICTDIR}/|' >> ${TMPPLIST})
.endfor
	@${ECHO_CMD} "@unexec ${RMDIR} %D/${DICTDIR} 2>/dev/null || true" >> ${TMPPLIST}

.include <bsd.port.post.mk>