[packages/zxing-cpp] - new

qboosh qboosh at pld-linux.org
Sun Apr 16 21:51:19 CEST 2017


commit 5a042a4735697a848e8ca1095d0967f3ee716198
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Apr 16 21:51:24 2017 +0200

    - new

 zxing-cpp-cmake.patch | 23 +++++++++++++
 zxing-cpp.spec        | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 117 insertions(+)
---
diff --git a/zxing-cpp.spec b/zxing-cpp.spec
new file mode 100644
index 0000000..8d1a320
--- /dev/null
+++ b/zxing-cpp.spec
@@ -0,0 +1,94 @@
+#
+# Conditional build:
+%bcond_without	opencv		# OpenCV interface
+#
+Summary:	C++ port of ZXing - 1D/2D barcode image processing library
+Summary(pl.UTF-8):	Port C++ biblioteki ZXing, przetwarzającej kody paskowe 1D/2D
+Name:		zxing-cpp
+# no version information in sources; cpp port has been removed from zxing repository between 2.3.0 and 3.0.0 releases
+Version:	2.3.0
+%define	gitref	6b3cbe02a332bff0f5ba0416f221d3d3876afdc2
+%define	snap	20161123
+Release:	0.%{snap}.1
+License:	Apache v2.0
+Group:		Libraries
+Source0:	https://github.com/glassechidna/zxing-cpp/archive/%{gitref}/%{name}-%{snap}.tar.gz
+# Source0-md5:	14a1766c04ac825fc588c03b2fb04be1
+Patch0:		%{name}-cmake.patch
+URL:		https://github.com/glassechidna/zxing-cpp
+BuildRequires:	cmake >= 2.8.0
+BuildRequires:	libstdc++-devel
+%{?with_opencv:BuildRequires:	opencv-devel}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+C++ port of ZXing - 1D/2D barcode image processing library.
+
+%description -l pl.UTF-8
+Port C++ biblioteki ZXing, przetwarzającej kody paskowe 1D/2D
+
+%package opencv
+Summary:	OpenCV/ZXing based QR code recognizer
+Summary(pl.UTF-8):	Program do rozpoznawania kodów QR oparty na bibliotekach OpenCV/ZXing
+Group:		Applications/Graphics
+Requires:	%{name} = %{version}-%{release}
+
+%description opencv
+OpenCV/ZXing based QR code recognizer.
+
+%description opencv -l pl.UTF-8
+Program do rozpoznawania kodów QR oparty na bibliotekach OpenCV/ZXing.
+
+%package devel
+Summary:	Header files for ZXing library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki ZXing
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	libstdc++-devel
+
+%description devel
+Header files for ZXing library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki ZXing.
+
+%prep
+%setup -q -n %{name}-%{gitref}
+%patch0 -p1
+
+%build
+install -d build
+cd build
+%cmake .. \
+	%{!?with_opencv:-DOpenCV_FOUND=OFF}
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS README.md
+%attr(755,root,root) %{_bindir}/zxing
+%attr(755,root,root) %{_libdir}/libzxing.so.0
+
+%if %{with opencv}
+%files opencv
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/zxing-cv
+%endif
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libzxing.so
+%{_includedir}/zxing
diff --git a/zxing-cpp-cmake.patch b/zxing-cpp-cmake.patch
new file mode 100644
index 0000000..0c9b25d
--- /dev/null
+++ b/zxing-cpp-cmake.patch
@@ -0,0 +1,23 @@
+--- zxing-cpp-6b3cbe02a332bff0f5ba0416f221d3d3876afdc2/CMakeLists.txt.orig	2016-11-22 04:34:19.000000000 +0100
++++ zxing-cpp-6b3cbe02a332bff0f5ba0416f221d3d3876afdc2/CMakeLists.txt	2017-04-16 21:29:53.022165125 +0200
+@@ -65,7 +65,7 @@
+ 
+ include_directories("./core/src/")
+ add_library(libzxing ${LIBZXING_FILES})
+-set_target_properties(libzxing PROPERTIES PREFIX "")
++set_target_properties(libzxing PROPERTIES PREFIX "" SOVERSION 0)
+ 
+ find_package(Iconv)
+ if(ICONV_FOUND)
+@@ -94,9 +94,9 @@
+ add_executable(zxing ${ZXING_FILES})
+ target_link_libraries(zxing libzxing)
+ install(TARGETS zxing libzxing
+-	LIBRARY DESTINATION lib
++	LIBRARY DESTINATION lib${LIB_SUFFIX}
+ 	RUNTIME DESTINATION bin
+-	ARCHIVE DESTINATION lib)
++	ARCHIVE DESTINATION lib${LIB_SUFFIX})
+ install(DIRECTORY core/src/zxing/ DESTINATION include/zxing FILES_MATCHING PATTERN "*.h")
+ 
+ # Add testrunner executable.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zxing-cpp.git/commitdiff/5a042a4735697a848e8ca1095d0967f3ee716198



More information about the pld-cvs-commit mailing list