zxing-cpp/zxing-cpp.spec

118 lines
3.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package zxing-cpp
#
# Copyright (c) 2021 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/
#
%define sover 1
Name: zxing-cpp
Version: 1.2.0
Release: 0
Summary: Library for processing 1D and 2D barcodes
License: Apache-2.0 AND Zlib AND LGPL-2.1-with-Qt-Company-Qt-exception-1.1
Group: Development/Languages/C and C++
URL: https://github.com/nu-book/zxing-cpp/
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source99: baselibs.conf
# PATCH-FIX-OPENSUSE cmake-check-system-first.patch -- Search system for needed libraries first
Patch0: cmake-check-system-first.patch
BuildRequires: pkgconfig
# Use cmake3 package on SLE12 because cmake is too old (version 3.5)
%if !0%{?is_opensuse} && 0%{?sle_version} < 150000
BuildRequires: cmake3-full >= 3.10
BuildRequires: gcc11-c++
%else
Accepting request 827103 from home:cgiboudeaux:zxing - Update to 1.1.0 * Add Python binding * Bug fixes from upstream XZing project * Many performance improvements for 1D readers * More meta-data exported when reading specific format * Minor bug fixes and improvements for corner cases * Improve DataMatrix encoder * Add interface to simplify basic usage * WASM API to support pixels array as input * Few minor bug fixes * A new and (hopefully) 'future proof' single ReadBarcode entry point into the decoding functionality. * The LuminanceSource based API is now deprecated but still compiles. * A new BarcodeFormats flag type to specify the set of barcodes to look for. * Deprecated unrelyable Result::resultPoints in favor of well defined Result::position. * Deprecated Result::metadata() -> ORIENTATION in favor of Result::orientation. * New Binarizer enum in DecodeHints to specify the binarizer for the ReadBarcode API. * New DecodeHints::isPure property to speed up detection for 'pure' input use-cases. * New 'unified' CMake structure to build (most) of the project from the top-level project. * New ZXingReader and ZXingWriter example code also meant for distributing. * New simplified and consistent Python API (breaking change) * ReedSolomon error detection code 2x speedup. * Enable basic MaxiCode support. * Fix coutry-code metatdata decoding for UPC/EAN codes. * Slightly improved QRCode detection for rotated symbols. OBS-URL: https://build.opensuse.org/request/show/827103 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=9
2020-08-19 10:55:31 +02:00
BuildRequires: cmake >= 3.10
BuildRequires: gcc-c++
# For tests using the example app
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Multimedia)
%endif
# only TW has fmt
%if 0%{?suse_version} > 1500
# For blackbox tests
BuildRequires: cmake(fmt) >= 7.1.2
%endif
%description
ZXing ("zebra crossing") is an multi-format 1D/2D barcode image
processing library. This package provides a C++ implementation.
Accepting request 827103 from home:cgiboudeaux:zxing - Update to 1.1.0 * Add Python binding * Bug fixes from upstream XZing project * Many performance improvements for 1D readers * More meta-data exported when reading specific format * Minor bug fixes and improvements for corner cases * Improve DataMatrix encoder * Add interface to simplify basic usage * WASM API to support pixels array as input * Few minor bug fixes * A new and (hopefully) 'future proof' single ReadBarcode entry point into the decoding functionality. * The LuminanceSource based API is now deprecated but still compiles. * A new BarcodeFormats flag type to specify the set of barcodes to look for. * Deprecated unrelyable Result::resultPoints in favor of well defined Result::position. * Deprecated Result::metadata() -> ORIENTATION in favor of Result::orientation. * New Binarizer enum in DecodeHints to specify the binarizer for the ReadBarcode API. * New DecodeHints::isPure property to speed up detection for 'pure' input use-cases. * New 'unified' CMake structure to build (most) of the project from the top-level project. * New ZXingReader and ZXingWriter example code also meant for distributing. * New simplified and consistent Python API (breaking change) * ReedSolomon error detection code 2x speedup. * Enable basic MaxiCode support. * Fix coutry-code metatdata decoding for UPC/EAN codes. * Slightly improved QRCode detection for rotated symbols. OBS-URL: https://build.opensuse.org/request/show/827103 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=9
2020-08-19 10:55:31 +02:00
%package -n libZXing%{sover}
Summary: Library for processing 1D and 2D barcodes
Accepting request 827103 from home:cgiboudeaux:zxing - Update to 1.1.0 * Add Python binding * Bug fixes from upstream XZing project * Many performance improvements for 1D readers * More meta-data exported when reading specific format * Minor bug fixes and improvements for corner cases * Improve DataMatrix encoder * Add interface to simplify basic usage * WASM API to support pixels array as input * Few minor bug fixes * A new and (hopefully) 'future proof' single ReadBarcode entry point into the decoding functionality. * The LuminanceSource based API is now deprecated but still compiles. * A new BarcodeFormats flag type to specify the set of barcodes to look for. * Deprecated unrelyable Result::resultPoints in favor of well defined Result::position. * Deprecated Result::metadata() -> ORIENTATION in favor of Result::orientation. * New Binarizer enum in DecodeHints to specify the binarizer for the ReadBarcode API. * New DecodeHints::isPure property to speed up detection for 'pure' input use-cases. * New 'unified' CMake structure to build (most) of the project from the top-level project. * New ZXingReader and ZXingWriter example code also meant for distributing. * New simplified and consistent Python API (breaking change) * ReedSolomon error detection code 2x speedup. * Enable basic MaxiCode support. * Fix coutry-code metatdata decoding for UPC/EAN codes. * Slightly improved QRCode detection for rotated symbols. OBS-URL: https://build.opensuse.org/request/show/827103 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=9
2020-08-19 10:55:31 +02:00
# called libZXing in the 1.1.0 update
Group: System/Libraries
Accepting request 827103 from home:cgiboudeaux:zxing - Update to 1.1.0 * Add Python binding * Bug fixes from upstream XZing project * Many performance improvements for 1D readers * More meta-data exported when reading specific format * Minor bug fixes and improvements for corner cases * Improve DataMatrix encoder * Add interface to simplify basic usage * WASM API to support pixels array as input * Few minor bug fixes * A new and (hopefully) 'future proof' single ReadBarcode entry point into the decoding functionality. * The LuminanceSource based API is now deprecated but still compiles. * A new BarcodeFormats flag type to specify the set of barcodes to look for. * Deprecated unrelyable Result::resultPoints in favor of well defined Result::position. * Deprecated Result::metadata() -> ORIENTATION in favor of Result::orientation. * New Binarizer enum in DecodeHints to specify the binarizer for the ReadBarcode API. * New DecodeHints::isPure property to speed up detection for 'pure' input use-cases. * New 'unified' CMake structure to build (most) of the project from the top-level project. * New ZXingReader and ZXingWriter example code also meant for distributing. * New simplified and consistent Python API (breaking change) * ReedSolomon error detection code 2x speedup. * Enable basic MaxiCode support. * Fix coutry-code metatdata decoding for UPC/EAN codes. * Slightly improved QRCode detection for rotated symbols. OBS-URL: https://build.opensuse.org/request/show/827103 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=9
2020-08-19 10:55:31 +02:00
Provides: libZXingCore%{sover} = %{version}
Obsoletes: libZXingCore%{sover} < %{version}
Accepting request 827103 from home:cgiboudeaux:zxing - Update to 1.1.0 * Add Python binding * Bug fixes from upstream XZing project * Many performance improvements for 1D readers * More meta-data exported when reading specific format * Minor bug fixes and improvements for corner cases * Improve DataMatrix encoder * Add interface to simplify basic usage * WASM API to support pixels array as input * Few minor bug fixes * A new and (hopefully) 'future proof' single ReadBarcode entry point into the decoding functionality. * The LuminanceSource based API is now deprecated but still compiles. * A new BarcodeFormats flag type to specify the set of barcodes to look for. * Deprecated unrelyable Result::resultPoints in favor of well defined Result::position. * Deprecated Result::metadata() -> ORIENTATION in favor of Result::orientation. * New Binarizer enum in DecodeHints to specify the binarizer for the ReadBarcode API. * New DecodeHints::isPure property to speed up detection for 'pure' input use-cases. * New 'unified' CMake structure to build (most) of the project from the top-level project. * New ZXingReader and ZXingWriter example code also meant for distributing. * New simplified and consistent Python API (breaking change) * ReedSolomon error detection code 2x speedup. * Enable basic MaxiCode support. * Fix coutry-code metatdata decoding for UPC/EAN codes. * Slightly improved QRCode detection for rotated symbols. OBS-URL: https://build.opensuse.org/request/show/827103 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=9
2020-08-19 10:55:31 +02:00
%description -n libZXing%{sover}
ZXing ("zebra crossing") is an multi-format 1D/2D barcode image
processing library. This package provides a C++ implementation.
%package devel
Summary: Header files for zxing, a library for processing 1D and 2D barcodes
Group: Development/Languages/C and C++
Accepting request 827103 from home:cgiboudeaux:zxing - Update to 1.1.0 * Add Python binding * Bug fixes from upstream XZing project * Many performance improvements for 1D readers * More meta-data exported when reading specific format * Minor bug fixes and improvements for corner cases * Improve DataMatrix encoder * Add interface to simplify basic usage * WASM API to support pixels array as input * Few minor bug fixes * A new and (hopefully) 'future proof' single ReadBarcode entry point into the decoding functionality. * The LuminanceSource based API is now deprecated but still compiles. * A new BarcodeFormats flag type to specify the set of barcodes to look for. * Deprecated unrelyable Result::resultPoints in favor of well defined Result::position. * Deprecated Result::metadata() -> ORIENTATION in favor of Result::orientation. * New Binarizer enum in DecodeHints to specify the binarizer for the ReadBarcode API. * New DecodeHints::isPure property to speed up detection for 'pure' input use-cases. * New 'unified' CMake structure to build (most) of the project from the top-level project. * New ZXingReader and ZXingWriter example code also meant for distributing. * New simplified and consistent Python API (breaking change) * ReedSolomon error detection code 2x speedup. * Enable basic MaxiCode support. * Fix coutry-code metatdata decoding for UPC/EAN codes. * Slightly improved QRCode detection for rotated symbols. OBS-URL: https://build.opensuse.org/request/show/827103 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=9
2020-08-19 10:55:31 +02:00
Requires: libZXing%{sover} = %{version}
%description devel
ZXing ("zebra crossing") is an multi-format 1D/2D barcode image
processing library. This package provides header files to use ZXing in
other applications.
Accepting request 827103 from home:cgiboudeaux:zxing - Update to 1.1.0 * Add Python binding * Bug fixes from upstream XZing project * Many performance improvements for 1D readers * More meta-data exported when reading specific format * Minor bug fixes and improvements for corner cases * Improve DataMatrix encoder * Add interface to simplify basic usage * WASM API to support pixels array as input * Few minor bug fixes * A new and (hopefully) 'future proof' single ReadBarcode entry point into the decoding functionality. * The LuminanceSource based API is now deprecated but still compiles. * A new BarcodeFormats flag type to specify the set of barcodes to look for. * Deprecated unrelyable Result::resultPoints in favor of well defined Result::position. * Deprecated Result::metadata() -> ORIENTATION in favor of Result::orientation. * New Binarizer enum in DecodeHints to specify the binarizer for the ReadBarcode API. * New DecodeHints::isPure property to speed up detection for 'pure' input use-cases. * New 'unified' CMake structure to build (most) of the project from the top-level project. * New ZXingReader and ZXingWriter example code also meant for distributing. * New simplified and consistent Python API (breaking change) * ReedSolomon error detection code 2x speedup. * Enable basic MaxiCode support. * Fix coutry-code metatdata decoding for UPC/EAN codes. * Slightly improved QRCode detection for rotated symbols. OBS-URL: https://build.opensuse.org/request/show/827103 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=9
2020-08-19 10:55:31 +02:00
%prep
%autosetup -p1
%build
# Use g++-11 to build a C++17 codebase
# Examples require QT5
# Blackbox tests require fmt
%cmake \
%if !0%{?is_opensuse} && 0%{?sle_version} < 150000
-DCMAKE_CXX_COMPILER=/usr/bin/g++-11 \
-DBUILD_EXAMPLES=OFF \
%endif
%if 0%{?suse_version} < 1550
-DBUILD_BLACKBOX_TESTS=OFF \
%endif
;
%cmake_build
Accepting request 827103 from home:cgiboudeaux:zxing - Update to 1.1.0 * Add Python binding * Bug fixes from upstream XZing project * Many performance improvements for 1D readers * More meta-data exported when reading specific format * Minor bug fixes and improvements for corner cases * Improve DataMatrix encoder * Add interface to simplify basic usage * WASM API to support pixels array as input * Few minor bug fixes * A new and (hopefully) 'future proof' single ReadBarcode entry point into the decoding functionality. * The LuminanceSource based API is now deprecated but still compiles. * A new BarcodeFormats flag type to specify the set of barcodes to look for. * Deprecated unrelyable Result::resultPoints in favor of well defined Result::position. * Deprecated Result::metadata() -> ORIENTATION in favor of Result::orientation. * New Binarizer enum in DecodeHints to specify the binarizer for the ReadBarcode API. * New DecodeHints::isPure property to speed up detection for 'pure' input use-cases. * New 'unified' CMake structure to build (most) of the project from the top-level project. * New ZXingReader and ZXingWriter example code also meant for distributing. * New simplified and consistent Python API (breaking change) * ReedSolomon error detection code 2x speedup. * Enable basic MaxiCode support. * Fix coutry-code metatdata decoding for UPC/EAN codes. * Slightly improved QRCode detection for rotated symbols. OBS-URL: https://build.opensuse.org/request/show/827103 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=9
2020-08-19 10:55:31 +02:00
%install
%cmake_install
%check
%if 0%{?sle_version}
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
%endif
%ctest
Accepting request 827103 from home:cgiboudeaux:zxing - Update to 1.1.0 * Add Python binding * Bug fixes from upstream XZing project * Many performance improvements for 1D readers * More meta-data exported when reading specific format * Minor bug fixes and improvements for corner cases * Improve DataMatrix encoder * Add interface to simplify basic usage * WASM API to support pixels array as input * Few minor bug fixes * A new and (hopefully) 'future proof' single ReadBarcode entry point into the decoding functionality. * The LuminanceSource based API is now deprecated but still compiles. * A new BarcodeFormats flag type to specify the set of barcodes to look for. * Deprecated unrelyable Result::resultPoints in favor of well defined Result::position. * Deprecated Result::metadata() -> ORIENTATION in favor of Result::orientation. * New Binarizer enum in DecodeHints to specify the binarizer for the ReadBarcode API. * New DecodeHints::isPure property to speed up detection for 'pure' input use-cases. * New 'unified' CMake structure to build (most) of the project from the top-level project. * New ZXingReader and ZXingWriter example code also meant for distributing. * New simplified and consistent Python API (breaking change) * ReedSolomon error detection code 2x speedup. * Enable basic MaxiCode support. * Fix coutry-code metatdata decoding for UPC/EAN codes. * Slightly improved QRCode detection for rotated symbols. OBS-URL: https://build.opensuse.org/request/show/827103 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=9
2020-08-19 10:55:31 +02:00
%post -n libZXing%{sover} -p /sbin/ldconfig
%postun -n libZXing%{sover} -p /sbin/ldconfig
%files -n libZXing%{sover}
%doc README.md
%license LICENSE.*
%{_libdir}/libZXing.so.%{sover}
%{_libdir}/libZXing.so.%{sover}.*
%files devel
%license LICENSE.*
%{_includedir}/ZXing/
%{_libdir}/cmake/ZXing/
Accepting request 827103 from home:cgiboudeaux:zxing - Update to 1.1.0 * Add Python binding * Bug fixes from upstream XZing project * Many performance improvements for 1D readers * More meta-data exported when reading specific format * Minor bug fixes and improvements for corner cases * Improve DataMatrix encoder * Add interface to simplify basic usage * WASM API to support pixels array as input * Few minor bug fixes * A new and (hopefully) 'future proof' single ReadBarcode entry point into the decoding functionality. * The LuminanceSource based API is now deprecated but still compiles. * A new BarcodeFormats flag type to specify the set of barcodes to look for. * Deprecated unrelyable Result::resultPoints in favor of well defined Result::position. * Deprecated Result::metadata() -> ORIENTATION in favor of Result::orientation. * New Binarizer enum in DecodeHints to specify the binarizer for the ReadBarcode API. * New DecodeHints::isPure property to speed up detection for 'pure' input use-cases. * New 'unified' CMake structure to build (most) of the project from the top-level project. * New ZXingReader and ZXingWriter example code also meant for distributing. * New simplified and consistent Python API (breaking change) * ReedSolomon error detection code 2x speedup. * Enable basic MaxiCode support. * Fix coutry-code metatdata decoding for UPC/EAN codes. * Slightly improved QRCode detection for rotated symbols. OBS-URL: https://build.opensuse.org/request/show/827103 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zxing-cpp?expand=0&rev=9
2020-08-19 10:55:31 +02:00
%{_libdir}/libZXing.so
%{_libdir}/pkgconfig/zxing.pc
%changelog