2022-11-09 07:26:40 +00:00
|
|
|
%ifarch %{java_arches}
|
|
|
|
|
%global JAVA 1
|
|
|
|
|
%else
|
|
|
|
|
%global JAVA 0
|
|
|
|
|
%endif
|
|
|
|
|
|
2020-10-22 19:39:19 +08:00
|
|
|
Name: zbar
|
2024-02-02 14:41:50 +08:00
|
|
|
Version: 0.23.93
|
2022-11-09 07:26:40 +00:00
|
|
|
Release: 1
|
2020-10-22 19:39:19 +08:00
|
|
|
Summary: Bar code reader
|
2024-02-02 14:41:50 +08:00
|
|
|
License: LGPL-2.1-or-later
|
2022-11-09 07:26:40 +00:00
|
|
|
URL: https://zbar.sourceforge.net/
|
|
|
|
|
Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2
|
|
|
|
|
Patch0: use_python3_on_python_script.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: autoconf
|
|
|
|
|
BuildRequires: automake
|
|
|
|
|
BuildRequires: dbus-devel
|
|
|
|
|
BuildRequires: gettext-devel
|
|
|
|
|
BuildRequires: GraphicsMagick-devel
|
|
|
|
|
BuildRequires: gtk3-devel
|
|
|
|
|
BuildRequires: libSM-devel
|
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
BuildRequires: libv4l-devel
|
|
|
|
|
BuildRequires: libXv-devel
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: pygobject3-devel
|
|
|
|
|
BuildRequires: qt5-qtbase-devel
|
|
|
|
|
BuildRequires: qt5-qtx11extras-devel
|
|
|
|
|
BuildRequires: xmlto
|
|
|
|
|
%if %{JAVA}
|
|
|
|
|
BuildRequires: java-11-openjdk-devel
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: python3-devel
|
2019-12-04 16:18:13 +08:00
|
|
|
|
|
|
|
|
%description
|
2022-11-09 07:26:40 +00:00
|
|
|
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 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ Code.
|
2019-12-04 16:18:13 +08:00
|
|
|
|
|
|
|
|
%package devel
|
2022-11-09 07:26:40 +00:00
|
|
|
Summary: Bar code reader library extra development files
|
|
|
|
|
Requires: %{name}-libs%{_isa} = %{version}-%{release}
|
2019-12-04 16:18:13 +08:00
|
|
|
|
|
|
|
|
%description devel
|
2020-10-22 19:39:19 +08:00
|
|
|
This package contains header files and additional libraries used for
|
|
|
|
|
developing applications that read bar codes with this library.
|
|
|
|
|
|
2022-11-09 07:26:40 +00:00
|
|
|
%package libs
|
|
|
|
|
Summary: Bar code reader library
|
|
|
|
|
|
|
|
|
|
%description libs
|
|
|
|
|
This package contains the ZBar Bar Code Reader library.
|
|
|
|
|
|
2020-10-22 19:39:19 +08:00
|
|
|
%package gtk
|
2022-11-09 07:26:40 +00:00
|
|
|
Summary: Bar code reader GTK widget
|
|
|
|
|
Requires: %{name}-libs%{_isa} = %{version}-%{release}
|
|
|
|
|
# Obsoleted in F37
|
|
|
|
|
Obsoletes: %{name}-gi < %{version}-%{release}
|
2020-10-22 19:39:19 +08:00
|
|
|
|
|
|
|
|
%description gtk
|
|
|
|
|
This package contains a bar code scanning widget for use with GUI
|
2022-11-09 07:26:40 +00:00
|
|
|
applications based on GTK 3.
|
2020-10-22 19:39:19 +08:00
|
|
|
|
|
|
|
|
%package gtk-devel
|
2022-11-09 07:26:40 +00:00
|
|
|
Summary: Bar code reader GTK widget extra development files
|
|
|
|
|
Requires: %{name}-devel%{_isa} = %{version}-%{release}
|
|
|
|
|
Requires: %{name}-gtk%{_isa} = %{version}-%{release}
|
2019-12-04 16:18:13 +08:00
|
|
|
|
2020-10-22 19:39:19 +08:00
|
|
|
%description gtk-devel
|
|
|
|
|
This package contains header files and additional libraries used for
|
2022-11-09 07:26:40 +00:00
|
|
|
developing GUI applications based on GTK 3 that include a bar code
|
2020-10-22 19:39:19 +08:00
|
|
|
scanning widget.
|
2019-12-04 16:18:13 +08:00
|
|
|
|
2020-10-22 19:39:19 +08:00
|
|
|
%package qt
|
2022-11-09 07:26:40 +00:00
|
|
|
Summary: Bar code reader Qt widget
|
|
|
|
|
Requires: %{name}-libs%{_isa} = %{version}-%{release}
|
2020-10-22 19:39:19 +08:00
|
|
|
|
|
|
|
|
%description qt
|
|
|
|
|
This package contains a bar code scanning widget for use with GUI
|
|
|
|
|
applications based on Qt4.
|
|
|
|
|
|
|
|
|
|
%package qt-devel
|
2022-11-09 07:26:40 +00:00
|
|
|
Summary: Bar code reader Qt widget extra development files
|
|
|
|
|
Requires: %{name}-devel%{_isa} = %{version}-%{release}
|
|
|
|
|
Requires: %{name}-qt%{_isa} = %{version}-%{release}
|
2020-10-22 19:39:19 +08:00
|
|
|
|
|
|
|
|
%description qt-devel
|
|
|
|
|
This package contains header files and additional libraries used for
|
2022-11-09 07:26:40 +00:00
|
|
|
developing GUI applications based on Qt5 that include a bar code
|
2020-10-22 19:39:19 +08:00
|
|
|
scanning widget.
|
2019-12-04 16:18:13 +08:00
|
|
|
|
2022-11-09 07:26:40 +00:00
|
|
|
%package -n python3-zbar
|
|
|
|
|
Summary: Bar code reader PyGTK widget
|
|
|
|
|
Requires: %{name}-libs%{_isa} = %{version}-%{release}
|
|
|
|
|
Requires: python3-pillow
|
|
|
|
|
# Renamed in F37
|
|
|
|
|
Obsoletes: %{name}-python3 < %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n python3-zbar
|
|
|
|
|
This package contains a bar code scanning widget for use on
|
|
|
|
|
python applications that work with images.
|
|
|
|
|
|
|
|
|
|
%if %{JAVA}
|
|
|
|
|
%package java
|
|
|
|
|
Summary: Bar code reader Java library
|
|
|
|
|
Requires: %{name}-devel%{_isa} = %{version}-%{release}
|
|
|
|
|
Requires: %{name}-gtk%{_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description java
|
|
|
|
|
This package contains header files and additional libraries used for
|
|
|
|
|
on Java Native Interface (JNI) applications using ZBar.
|
|
|
|
|
%endif
|
|
|
|
|
|
2019-12-04 16:18:13 +08:00
|
|
|
%prep
|
2024-02-02 14:41:50 +08:00
|
|
|
%autosetup -p1
|
2019-12-04 16:18:13 +08:00
|
|
|
|
|
|
|
|
%build
|
2022-11-09 07:26:40 +00:00
|
|
|
%configure --with-python=python3 --with-gtk=auto --docdir=%{_docdir}/%{name}-%{version} --with-graphicsmagick --without-xshm --without-xv --enable-codes=ean,databar,code128,code93,code39,codabar,i25,qrcode,sqcode,pdf417
|
|
|
|
|
|
|
|
|
|
# rpath
|
2019-12-04 16:18:13 +08:00
|
|
|
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
|
|
|
|
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
2022-11-09 07:26:40 +00:00
|
|
|
|
|
|
|
|
%make_build
|
2019-12-04 16:18:13 +08:00
|
|
|
|
|
|
|
|
%install
|
2022-11-09 07:26:40 +00:00
|
|
|
%make_install
|
|
|
|
|
%if %{JAVA}
|
|
|
|
|
install -d %{buildroot}%{_jnidir}
|
|
|
|
|
mv %{buildroot}%{_datadir}/zbar/lib/zbar.jar %{buildroot}%{_jnidir}
|
|
|
|
|
mv %{buildroot}%{_datadir}/zbar/lib/libzbarjni.so* %{buildroot}%{_libdir}
|
|
|
|
|
%endif
|
|
|
|
|
cp test/test_python.py %{buildroot}%{_docdir}
|
|
|
|
|
|
|
|
|
|
#Remove .la and .a files
|
2020-10-22 19:39:19 +08:00
|
|
|
find ${RPM_BUILD_ROOT} -name '*.la' -or -name '*.a' | xargs rm -f
|
2022-11-09 07:26:40 +00:00
|
|
|
|
|
|
|
|
# Remove installed doc
|
2019-12-04 16:18:13 +08:00
|
|
|
rm -rf $RPM_BUILD_ROOT/usr/share/doc/zbar-%{version}/
|
2022-11-09 07:26:40 +00:00
|
|
|
|
2020-10-22 19:39:19 +08:00
|
|
|
%ldconfig_scriptlets
|
2022-11-09 07:26:40 +00:00
|
|
|
|
2020-10-22 19:39:19 +08:00
|
|
|
%ldconfig_scriptlets devel
|
2022-11-09 07:26:40 +00:00
|
|
|
|
2020-10-22 19:39:19 +08:00
|
|
|
%ldconfig_scriptlets gtk
|
2022-11-09 07:26:40 +00:00
|
|
|
|
2020-10-22 19:39:19 +08:00
|
|
|
%ldconfig_scriptlets qt
|
2019-12-04 16:18:13 +08:00
|
|
|
|
2022-11-09 07:26:40 +00:00
|
|
|
%find_lang zbar
|
|
|
|
|
|
2019-12-04 16:18:13 +08:00
|
|
|
%files
|
2022-11-09 07:26:40 +00:00
|
|
|
%doc NEWS.md README.md INSTALL.md
|
2020-10-22 19:39:19 +08:00
|
|
|
%{_bindir}/zbarimg
|
|
|
|
|
%{_bindir}/zbarcam
|
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
%{_sysconfdir}/dbus-1/system.d/org.linuxtv.Zbar.conf
|
2019-12-04 16:18:13 +08:00
|
|
|
|
2022-11-09 07:26:40 +00:00
|
|
|
%files libs -f zbar.lang
|
|
|
|
|
%license COPYING LICENSE.md
|
|
|
|
|
%{_libdir}/libzbar.so.0*
|
|
|
|
|
|
2019-12-04 16:18:13 +08:00
|
|
|
%files devel
|
2022-11-09 07:26:40 +00:00
|
|
|
%doc HACKING.md TODO.md
|
2020-10-22 19:39:19 +08:00
|
|
|
%{_libdir}/libzbar.so
|
|
|
|
|
%{_libdir}/pkgconfig/zbar.pc
|
|
|
|
|
%dir %{_includedir}/zbar
|
|
|
|
|
%{_includedir}/zbar.h
|
|
|
|
|
%{_includedir}/zbar/Exception.h
|
|
|
|
|
%{_includedir}/zbar/Symbol.h
|
|
|
|
|
%{_includedir}/zbar/Image.h
|
|
|
|
|
%{_includedir}/zbar/Scanner.h
|
|
|
|
|
%{_includedir}/zbar/Decoder.h
|
|
|
|
|
%{_includedir}/zbar/ImageScanner.h
|
|
|
|
|
%{_includedir}/zbar/Video.h
|
|
|
|
|
%{_includedir}/zbar/Window.h
|
|
|
|
|
%{_includedir}/zbar/Processor.h
|
|
|
|
|
|
|
|
|
|
%files gtk
|
|
|
|
|
%{_libdir}/libzbargtk.so.*
|
|
|
|
|
%{_bindir}/zbarcam-gtk
|
2022-11-09 07:26:40 +00:00
|
|
|
%dir %{_libdir}/girepository-1.0
|
|
|
|
|
%{_libdir}/girepository-1.0/ZBar-1.0.typelib
|
2020-10-22 19:39:19 +08:00
|
|
|
|
|
|
|
|
%files gtk-devel
|
|
|
|
|
%{_libdir}/libzbargtk.so
|
|
|
|
|
%{_libdir}/pkgconfig/zbar-gtk.pc
|
|
|
|
|
%{_includedir}/zbar/zbargtk.h
|
2022-11-09 07:26:40 +00:00
|
|
|
%dir %{_datadir}/gir-1.0
|
|
|
|
|
%{_datadir}/gir-1.0/ZBar-1.0.gir
|
2020-10-22 19:39:19 +08:00
|
|
|
|
|
|
|
|
%files qt
|
|
|
|
|
%{_libdir}/libzbarqt.so.*
|
|
|
|
|
%{_bindir}/zbarcam-qt
|
|
|
|
|
|
|
|
|
|
%files qt-devel
|
|
|
|
|
%{_libdir}/libzbarqt.so
|
|
|
|
|
%{_libdir}/pkgconfig/zbar-qt.pc
|
|
|
|
|
%{_includedir}/zbar/QZBar*.h
|
2019-12-04 16:18:13 +08:00
|
|
|
|
2022-11-09 07:26:40 +00:00
|
|
|
%if %{JAVA}
|
|
|
|
|
%files java
|
|
|
|
|
%{_jnidir}/zbar.jar
|
|
|
|
|
%{_libdir}/libzbarjni.so*
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-zbar
|
|
|
|
|
%{python3_sitearch}/zbar.so
|
|
|
|
|
%{_docdir}/test_python.py
|
|
|
|
|
|
2019-12-04 16:18:13 +08:00
|
|
|
%changelog
|
2024-02-02 14:41:50 +08:00
|
|
|
* Fri Feb 02 2024 wangkai <13474090681@163.com> - 0.23.93-1
|
|
|
|
|
- Update to 0.23.93 for fix CVE-2023-40889,CVE-2023-40890
|
|
|
|
|
|
2022-11-09 07:26:40 +00:00
|
|
|
* Wed Nov 9 2022 hkgy <kaguyahatu@outlook.com> - 0.23.90-1
|
|
|
|
|
- Upgrade to v0.23.90
|
|
|
|
|
|
|
|
|
|
* Sat Jan 15 2022 Chen Chen <chen_aka_jan@163.com> - 0.22.0-2
|
2022-01-15 16:49:28 +08:00
|
|
|
- remove autoreconf for fix build error
|
|
|
|
|
|
2022-11-09 07:26:40 +00:00
|
|
|
* Thu Oct 22 2020 caodongxia <caodongxia@huawei.com> - 0.22.0-1
|
2020-10-22 19:39:19 +08:00
|
|
|
- update package from 0.20.1 to 0.22
|
|
|
|
|
|
|
|
|
|
* Tue Dec 3 2019 lingsheng <lingsheng@huawei.com> - 0.20.1-4
|
2019-12-04 16:18:13 +08:00
|
|
|
- Package init
|