source: packages/utils/tesseract/Makefile @ 28783

Last change on this file since 28783 was 28783, checked in by nico, 5 years ago

packages: add tesseract

File size: 1.4 KB
Line 
1#
2# Copyright (C) 2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=tesseract
11PKG_VERSION:=3.01
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://tesseract-ocr.googlecode.com/files/
16PKG_MD5SUM:=1ba496e51a42358fb9d3ffe781b2d20a
17
18PKG_FIXUP:=libtool
19PKG_INSTALL:=1
20
21include $(INCLUDE_DIR)/package.mk
22
23define Package/tesseract
24  SECTION:=utils
25  CATEGORY:=Utilities
26  TITLE:=Tesseract Open Source OCR Engine
27  URL:=http://tesseract-ocr.googlecode.com/
28  DEPENDS:=+libleptonica +libpthread +libstdcpp
29endef
30
31CONFIGURE_ARGS += \
32        LIBLEPT_HEADERSDIR="$(STAGING_DIR)/usr/include" \
33
34TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
35
36define Build/InstallDev
37        $(INSTALL_DIR) $(1)/usr/include
38        $(CP) $(PKG_INSTALL_DIR)/usr/include/tesseract $(1)/usr/include/
39        $(INSTALL_DIR) $(1)/usr/lib
40        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtesseract.{a,so*} $(1)/usr/lib/
41endef
42
43define Package/tesseract/install
44        $(INSTALL_DIR) $(1)/usr/bin
45        $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
46        $(INSTALL_DIR) $(1)/usr/lib
47        $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
48        $(INSTALL_DIR) $(1)/usr/share
49        $(CP) $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/
50endef
51
52$(eval $(call BuildPackage,tesseract))
Note: See TracBrowser for help on using the repository browser.