/
zbar.spec
144 lines (115 loc) · 3.62 KB
/
zbar.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
%define hgtag 38e78368283d5afe34bbc0cedb36d4540cda3a30
%define major 0
%define libname %mklibname %{name} %{major}
%define libgtk %mklibname %{name}gtk %{major}
%define libqt %mklibname %{name}qt %{major}
%define devname %mklibname -d %{name}
Name: zbar
Summary: Bar Code Reader software suite for reading bar codes from various sources
Version: 0.23.92
Release: 3
License: GPLv2+
Group: Graphics
# See also https://linuxtv.org/downloads/zbar
URL: https://github.com/mchehab/zbar
Source0: https://github.com/mchehab/zbar/archive/refs/tags/%{version}.tar.gz
#Patch1: zbar-qt5.patch
BuildRequires: git
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: gettext-devel
BuildRequires: pkgconfig(Qt5Core) pkgconfig(Qt5Gui) pkgconfig(Qt5Widgets) pkgconfig(Qt5X11Extras)
BuildRequires: xmlto
BuildRequires: pkgconfig(MagickWand)
Requires: graphicsmagick
%description
ZBar Bar Code Reader is an open source software suite for reading bar
codes from various sources, such as video streams, image files and raw
intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128,
Code 39, Interleaved 2 of 5 and QR Code. Included with the library
are basic applications for decoding captured bar code images and using
a video device (eg, webcam) as a bar code scanner. For application
developers, language bindings are included for C, C++, Python and Perl
as well as GUI widgets for Qt, GTK and PyGTK.
%package qt
Summary: Qt frontend for the ZBar barcode reader
Group: Graphics
%description qt
Qt frontend for the ZBar barcode reader
%package gtk
Summary: Gtk frontend for the ZBar barcode reader
Group: Graphics
%description gtk
Gtk frontend for the ZBar barcode reader
%package -n %{libname}
Summary: ZBAR Libraries
Group: System/Libraries
%description -n %{libname}
Libraries for the ZBar Bar Code Reader
%package -n %{libgtk}
Summary: ZBAR Libraries
Group: System/Libraries
%description -n %{libgtk}
Libraries for the ZBar Bar Code Reader
%package -n %{libqt}
Summary: ZBAR Libraries
Group: System/Libraries
%description -n %{libqt}
Libraries for the ZBar Bar Code Reader
%package -n %{devname}
Summary: ZBAR Development headers and libraries
Group: Development/Other
Provides: %{name}-devel = %{version}-%{release}
Requires: %{libname} = %{version}
Requires: %{libgtk} = %{version}
Requires: %{libqt} = %{version}
%description -n %{devname}
Development headers and libraries for the ZBar Bar Code Reader
%package -n python-%{name}
Summary: Python bindings for ZBAR
Group: Development/Python
%description -n python-%{name}
Python bindings for the ZBar Bar Code Reader
#--------------------------------------------------------------------
%prep
%autosetup -p1
autoreconf -fi
%build
# --without-python because python 2.x needs to die
# and 3.x isn't supported yet
%configure \
--with-imagemagick \
--without-java \
--without-python
%make_build
%install
%makeinstall_std
%find_lang %{name}
%files -f %{name}.lang
%{_bindir}/zbarcam
%{_bindir}/zbarimg
%{_sysconfdir}/dbus-1/system.d/org.linuxtv.Zbar.conf
%doc %{_datadir}/doc/%{name}/*
%{_mandir}/man1/zbarcam.1*
%{_mandir}/man1/zbarimg.1*
%files qt
%{_bindir}/zbarcam-qt
%files gtk
%{_bindir}/zbarcam-gtk
%files -n %{libname}
%{_libdir}/libzbar.so.%{major}*
%files -n %{libgtk}
%{_libdir}/libzbargtk.so.%{major}*
%{_libdir}/girepository-1.0/ZBar-1.0.typelib
%{_datadir}/gir-1.0/ZBar-1.0.gir
%files -n %{libqt}
%{_libdir}/libzbarqt.so.%{major}*
%files -n %{devname}
%{_includedir}/zbar.h
%dir %{_includedir}/zbar
%{_includedir}/zbar/*.h
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libzbar.so
%{_libdir}/libzbargtk.so
%{_libdir}/libzbarqt.so