# # spec file for package gocr # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: gocr Version: 0.52 Release: 0 Summary: Optical Character Recognition Program License: GPL-2.0-or-later Group: Productivity/Graphics/Other URL: https://www-e.uni-magdeburg.de/jschulen/ocr/index.html Source0: https://www-e.uni-magdeburg.de/jschulen/ocr/%{name}-%{version}.tar.gz Source1: gocr.desktop BuildRequires: ImageMagick BuildRequires: ghostscript_any BuildRequires: gnu-free-fonts BuildRequires: libnetpbm-devel BuildRequires: transfig # Native supported format is pnm, others are imported with helpers Recommends: jpeg Recommends: netpbm Recommends: transfig %description GOCR is an optical character recognition program. It reads images in many formats and outputs a text file. It is also able to recognize and translate barcodes. %package gui Summary: Optical Character Recognition Program - Basic Graphical Interface Group: Productivity/Graphics/Other Requires: %{name} = %{version} Requires: tk Supplements: (gocr and tk) BuildArch: noarch %description gui GOCR is an optical character recognition program. It reads images in many formats and outputs a text file. It is also able to recognize and translate barcodes. This package contains a basic graphical interface for GOCR. %prep %setup -q # According to "convert -list font", the regular variant is just "FreeMono" sed -i -e 's,"FreeMono-Regular","FreeMono",' examples/Makefile # Fix rpmlint warning "hidden-file-or-dir" rm -f examples/.#Makefile.1.22 # Do not use urandom for examples to make package build reproducible (boo#1062303) cat > examples/rnd80.png.txt <