1 # Copyright (C) 2019 Valentin Kivachuk <vk18496@gmail.com>
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
11 PKG_RELEASE
:=$(AUTORELEASE
)
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_SOURCE_URL
:=https
://codeload.github.com
/tesseract-ocr
/tesseract
/tar.gz
/$(PKG_VERSION
)?
15 PKG_HASH
:=2a66ff0d8595bff8f04032165e6c936389b1e5727c3ce5a27b3e059d218db1cb
17 PKG_MAINTAINER
:=Valentin Kivachuk
<vk18496@gmail.com
>
18 PKG_LICENSE
:=Apache-2.0
19 PKG_LICENSE_FILES
:=LICENSE
21 CMAKE_BINARY_SUBDIR
:=openwrt-build
23 include $(INCLUDE_DIR
)/package.mk
24 include $(INCLUDE_DIR
)/cmake.mk
26 define Package
/tesseract
30 TITLE
:=Tesseract Open Source OCR Engine
31 URL
:=https
://github.com
/tesseract-ocr
/tesseract
32 DEPENDS
:=+libleptonica
+libarchive
+libpthread
+libstdcpp
35 TARGET_CFLAGS
:=$(filter-out -O
%,$(TARGET_CFLAGS
)) -O3
39 -DBUILD_TRAINING_TOOLS
=OFF
41 define Build
/InstallDev
42 $(INSTALL_DIR
) $(1)/usr
/include
43 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/tesseract
$(1)/usr
/include/
44 $(INSTALL_DIR
) $(1)/usr
/lib
45 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libtesseract.so
* $(1)/usr
/lib
/
46 $(INSTALL_DIR
) $(1)/usr
/lib
/cmake
47 $(CP
) $(PKG_INSTALL_DIR
)/usr
/cmake
/*.cmake
$(1)/usr
/lib
/cmake
/
48 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
49 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/tesseract.
pc $(1)/usr
/lib
/pkgconfig
/
52 define Package
/tesseract
/install
53 $(INSTALL_DIR
) $(1)/usr
/bin
54 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
55 $(INSTALL_DIR
) $(1)/usr
/lib
56 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
*.so.
* $(1)/usr
/lib
/
59 $(eval
$(call BuildPackage
,tesseract
))