]> git.pld-linux.org Git - packages/zxing-cpp.git/blame - zxing-cpp.spec
- adjust cmake target files install path (in cmake patch)
[packages/zxing-cpp.git] / zxing-cpp.spec
CommitLineData
5a042a47
JB
1#
2# Conditional build:
8c2a4d1b 3%bcond_without opencv # OpenCV interface
d0555491 4
d533dfad 5%define rel 1
5a042a47
JB
6Summary: C++ port of ZXing - 1D/2D barcode image processing library
7Summary(pl.UTF-8): Port C++ biblioteki ZXing, przetwarzającej kody paskowe 1D/2D
8Name: zxing-cpp
9# no version information in sources; cpp port has been removed from zxing repository between 2.3.0 and 3.0.0 releases
10Version: 2.3.0
d533dfad
JB
11%define gitref e0e40ddec63f38405aca5c8c1ff60b85ec8b1f10
12%define snap 20190321
d0555491 13Release: 0.%{snap}.%{rel}
5a042a47
JB
14License: Apache v2.0
15Group: Libraries
16Source0: https://github.com/glassechidna/zxing-cpp/archive/%{gitref}/%{name}-%{snap}.tar.gz
d533dfad 17# Source0-md5: 41d2af7fc424e1c6129192bd87d54c5f
5a042a47 18Patch0: %{name}-cmake.patch
b8749e92 19Patch1: no-opencv.patch
5a042a47 20URL: https://github.com/glassechidna/zxing-cpp
8c2a4d1b 21BuildRequires: cmake >= 3.0
d533dfad
JB
22BuildRequires: libstdc++-devel >= 6:4.7
23%{?with_opencv:BuildRequires: opencv-devel >= 2}
5a042a47
JB
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
27C++ port of ZXing - 1D/2D barcode image processing library.
28
29%description -l pl.UTF-8
30Port C++ biblioteki ZXing, przetwarzającej kody paskowe 1D/2D
31
5a042a47
JB
32%package devel
33Summary: Header files for ZXing library
34Summary(pl.UTF-8): Pliki nagłówkowe biblioteki ZXing
35Group: Development/Libraries
36Requires: %{name} = %{version}-%{release}
d533dfad 37Requires: libstdc++-devel >= 6:4.7
5a042a47
JB
38
39%description devel
40Header files for ZXing library.
41
42%description devel -l pl.UTF-8
43Pliki nagłówkowe biblioteki ZXing.
44
c59a25df
JB
45%package opencv
46Summary: OpenCV/ZXing based QR code recognizer
47Summary(pl.UTF-8): Program do rozpoznawania kodów QR oparty na bibliotekach OpenCV/ZXing
48Group: Applications/Graphics
49Requires: %{name} = %{version}-%{release}
50
51%description opencv
52OpenCV/ZXing based QR code recognizer.
53
54%description opencv -l pl.UTF-8
55Program do rozpoznawania kodów QR oparty na bibliotekach OpenCV/ZXing.
56
8c2a4d1b
JB
57%package opencv-devel
58Summary: Header file for ZXing OpenCV library
59Summary(pl.UTF-8): Plik nagłówkowy biblioteki ZXing OpenCV
60Group: Development/Libraries
61Requires: %{name}-devel = %{version}-%{release}
62Requires: %{name}-opencv = %{version}-%{release}
63Requires: opencv-devel >= 2
64
65%description opencv-devel
66Header file for ZXing OpenCV library.
67
68%description opencv-devel -l pl.UTF-8
69Plik nagłówkowy biblioteki ZXing OpenCV.
70
5a042a47
JB
71%prep
72%setup -q -n %{name}-%{gitref}
73%patch0 -p1
b8749e92 74%patch1 -p1
5a042a47
JB
75
76%build
77install -d build
78cd build
79%cmake .. \
d533dfad 80 %{!?with_opencv:-DUSE_OPENCV=OFF}
5a042a47
JB
81
82%{__make}
83
84%install
85rm -rf $RPM_BUILD_ROOT
86
87%{__make} -C build install \
88 DESTDIR=$RPM_BUILD_ROOT
89
8c2a4d1b
JB
90# disable completeness check incompatible with split packaging
91%{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_libdir}/zxing/cmake/zxing-targets.cmake
c59a25df 92
5a042a47
JB
93%clean
94rm -rf $RPM_BUILD_ROOT
95
96%post -p /sbin/ldconfig
97%postun -p /sbin/ldconfig
98
c59a25df
JB
99%post opencv -p /sbin/ldconfig
100%postun opencv -p /sbin/ldconfig
101
5a042a47
JB
102%files
103%defattr(644,root,root,755)
104%doc AUTHORS README.md
105%attr(755,root,root) %{_bindir}/zxing
106%attr(755,root,root) %{_libdir}/libzxing.so.0
107
c59a25df
JB
108%files devel
109%defattr(644,root,root,755)
110%attr(755,root,root) %{_libdir}/libzxing.so
8c2a4d1b
JB
111%dir %{_includedir}/zxing
112%{_includedir}/zxing/aztec
113%{_includedir}/zxing/common
114%{_includedir}/zxing/datamatrix
115%{_includedir}/zxing/multi
116%{_includedir}/zxing/oned
117%{_includedir}/zxing/pdf417
118%{_includedir}/zxing/qrcode
119%{_includedir}/zxing/[!M]*.h
120%{_includedir}/zxing/MultiFormatReader.h
d533dfad
JB
121%dir %{_libdir}/zxing
122%{_libdir}/zxing/cmake
c59a25df 123
5a042a47
JB
124%if %{with opencv}
125%files opencv
126%defattr(644,root,root,755)
127%attr(755,root,root) %{_bindir}/zxing-cv
d533dfad 128%attr(755,root,root) %{_libdir}/libzxing-cv.so.0
8c2a4d1b
JB
129
130%files opencv-devel
131%defattr(644,root,root,755)
132%attr(755,root,root) %{_libdir}/libzxing-cv.so
133%{_includedir}/zxing/MatSource.h
5a042a47 134%endif
This page took 0.073235 seconds and 4 git commands to generate.