60bace6cff
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/packages@40647 3c298f89-4303-0410-b956-a3cf2f4a3e73
59 lines
1.5 KiB
Makefile
59 lines
1.5 KiB
Makefile
#
|
|
# Copyright (C) 2011 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=tesseract-ocr
|
|
PKG_VERSION:=3.02.02
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=http://tesseract-ocr.googlecode.com/files/
|
|
PKG_MD5SUM:=26adc8154f0e815053816825dde246e6
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
|
|
|
PKG_FIXUP:=autoreconf
|
|
PKG_INSTALL:=1
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/tesseract
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
TITLE:=Tesseract Open Source OCR Engine
|
|
URL:=http://tesseract-ocr.googlecode.com/
|
|
DEPENDS:=+libleptonica +libpthread +libstdcpp
|
|
endef
|
|
|
|
CONFIGURE_ARGS += \
|
|
LIBLEPT_HEADERSDIR="$(STAGING_DIR)/usr/include" \
|
|
|
|
TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
|
|
|
|
define Build/Prepare
|
|
$(call Build/Prepare/Default)
|
|
$(SED) '1s/^\xEF\xBB\xBF//' $(PKG_BUILD_DIR)/ccutil/strngs.h
|
|
endef
|
|
|
|
define Build/InstallDev
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/tesseract $(1)/usr/include/
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtesseract.{a,so*} $(1)/usr/lib/
|
|
endef
|
|
|
|
define Package/tesseract/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
|
|
$(INSTALL_DIR) $(1)/usr/share
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,tesseract))
|