summaryrefslogtreecommitdiff
path: root/graphics/tesseract/Makefile
blob: 7fb01aac7f25d735d12cd16421d60d573615ce29 (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
# $NetBSD: Makefile,v 1.9 2010/01/18 09:59:09 wiz Exp $
#

DISTNAME=	tesseract-2.04
PKGREVISION=	2
CATEGORIES=	graphics
MASTER_SITES=	http://tesseract-ocr.googlecode.com/files/
DISTFILES+=	${DISTNAME}.tar.gz
.for l in deu eng fra ita nld spa
DISTFILES+=	tesseract-2.00.${l}.tar.gz
.endfor

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://code.google.com/p/tesseract-ocr/
COMMENT=	Commercial quality open source OCR engine
LICENSE=	apache-2.0

PKG_DESTDIR_SUPPORT=	user-destdir
INSTALLATION_DIRS=	libexec share/doc/tesseract share/tesseract

GNU_CONFIGURE=	yes
USE_LANGUAGES=	c c++
USE_TOOLS+=	gmake pax

post-extract:
	${RM} ${WRKSRC}/java/makefile

post-build:
	${SED} -e "s,@PREFIX@,${PREFIX}," ${FILESDIR}/tesseract.sh \
		> ${WRKSRC}/tesseract.sh

post-install:
	${MV} ${DESTDIR}${PREFIX}/bin/tesseract ${DESTDIR}${PREFIX}/libexec
	${INSTALL_SCRIPT} ${WRKSRC}/tesseract.sh ${DESTDIR}${PREFIX}/bin/tesseract
	${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/tesseract
	${INSTALL_DATA} ${WRKSRC}/phototest.tif ${DESTDIR}${PREFIX}/share/tesseract
	cd ${WRKDIR}/tessdata && ${PAX} -rw * ${DESTDIR}${PREFIX}/share/tessdata
	chmod a-x ${DESTDIR}${PREFIX}/share/tessdata/*.*

.include "../../graphics/tiff/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"