diff --git a/fix-pkg-config-file.patch b/fix-pkg-config-file.patch new file mode 100644 index 0000000..96a405e --- /dev/null +++ b/fix-pkg-config-file.patch @@ -0,0 +1,13 @@ +Index: zxing-cpp-1.1.0/zxing.pc.in +=================================================================== +--- zxing-cpp-1.1.0.orig/zxing.pc.in ++++ zxing-cpp-1.1.0/zxing.pc.in +@@ -5,6 +5,6 @@ includedir=${prefix}/@CMAKE_INSTALL_INCL + + Name: ZXing + Description: ZXing library set +-Version: @VERSION@ +-Libs: -L${libdir} -l@TARGET_ZXING@ ++Version: @PROJECT_VERSION@ ++Libs: -L${libdir} -lZXing + Cflags: -I${includedir} -I${includedir}/ZXing diff --git a/zxing-cpp.changes b/zxing-cpp.changes index f577a78..d9624be 100644 --- a/zxing-cpp.changes +++ b/zxing-cpp.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Sep 4 07:16:43 UTC 2020 - Antonio Larrosa + +- Add fix for pkg-config file so the version and library are set properly + in the resulting .pc file: + * fix-pkg-config-file.patch + ------------------------------------------------------------------- Sun Aug 16 19:19:01 UTC 2020 - Christophe Giboudeaux diff --git a/zxing-cpp.spec b/zxing-cpp.spec index 1a3a4d2..30b9267 100644 --- a/zxing-cpp.spec +++ b/zxing-cpp.spec @@ -25,6 +25,7 @@ License: Apache-2.0 AND Zlib AND LGPL-2.1-with-Qt-Company-Qt-exception-1. Group: Development/Languages/C and C++ URL: https://github.com/nu-book/zxing-cpp/ Source0: https://github.com/nu-book/zxing-cpp/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: fix-pkg-config-file.patch BuildRequires: cmake >= 3.10 BuildRequires: gcc-c++ BuildRequires: pkgconfig @@ -35,8 +36,8 @@ processing library. This package provides a C++ implementation. %package -n libZXing%{sover} Summary: Library for processing 1D and 2D barcodes -Group: System/Libraries # called libZXing in the 1.1.0 update +Group: System/Libraries Provides: libZXingCore%{sover} = %{version} Obsoletes: libZXingCore%{sover} < %{version}