diff --git a/.gitignore b/.gitignore index 5a6ac22..1e58f83 100644 --- a/.gitignore +++ b/.gitignore @@ -2,13 +2,3 @@ zbar-0.10.tar.bz2 /zbar-0.10.tar.bz2 /zbar-0.20.tar.bz2 /zbar-0.20.1.tar.bz2 -/zbar-0.21.tar.bz2 -/zbar-0.22.tar.bz2 -/zbar-0.22.2.tar.gz -/zbar-0.22.2.tar.bz2 -/zbar-0.22.90.tar.bz2 -/zbar-0.22.91.tar.bz2 -/zbar-0.22.92.tar.bz2 -/zbar-0.23.tar.bz2 -/zbar-0.23.90.tar.bz2 -/zbar-0.23.93.tar.bz2 diff --git a/fix_qt_overlinking.patch b/fix_qt_overlinking.patch deleted file mode 100644 index 727a57e..0000000 --- a/fix_qt_overlinking.patch +++ /dev/null @@ -1,16 +0,0 @@ -This was causing Qt5 to be linked into every binary in zbar, where it is only -needed for the Qt bindings (which already specify QT_CFLAGS, QT_LIBS, etc). - -diff --git a/configure.ac b/configure.ac -index f0f9723..2a26973 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -689,8 +689,6 @@ AM_CONDITIONAL([HAVE_QT], [test "x$with_qt" = "xyes"]) - AM_COND_IF([HAVE_QT], - [AC_MSG_NOTICE([using Qt version $QT_VERSION]) - AC_MSG_NOTICE([using moc from $MOC]) -- CPPFLAGS="$CPPFLAGS $QT_CPPFLAGS" -- LIBS="$LIBS $QT_LIBS" - AC_CONFIG_FILES([zbar-qt.pc:"${qt_pkgconfig_file}.in"]) - #dnl -fPIC has no effect on Windows and breaks windres - AS_IF([test "x$win32" = "xno"], [CPPFLAGS="$CPPFLAGS -fPIC"])]) diff --git a/sources b/sources index 4eacb18..254e387 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zbar-0.23.93.tar.bz2) = 8b1d57557cb1c425109b709f0cbe94830939cb4cd9a0cb505d44ba3c7cfb3522560c3bbf2a8b37985da4577b677ad675491f6ef0e9796749382079c0e844e21e +SHA512 (zbar-0.20.1.tar.bz2) = 3b0949fe866eb9cb7a6ab66bfbc5ff2fc4193faf21a51c830d16e63453dcbd6e786e197fd5db40d62749af2487922e1775af860918717b0d51765d2b20dfd3f8 diff --git a/use_python3_on_python_script.patch b/use_python3_on_python_script.patch deleted file mode 100644 index 7161f1d..0000000 --- a/use_python3_on_python_script.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/test/test_python.py b/test/test_python.py -index 252c51a97256..8388d9a5aa36 100755 ---- a/test/test_python.py -+++ b/test/test_python.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - #------------------------------------------------------------------------ - # Copyright 2019 (c) Mauro Carvalho Chehab - # diff --git a/zbar.spec b/zbar.spec index 255f4e8..b272827 100644 --- a/zbar.spec +++ b/zbar.spec @@ -1,176 +1,136 @@ -%ifarch %{java_arches} -%global JAVA 1 -%else -%global JAVA 0 -%endif +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: zbar -Version: 0.23.93 -Release: 13%{?dist} +Version: 0.20.1 +Release: 1%{?dist} Summary: Bar code reader -License: LGPL-2.1-or-later +Group: User Interface/X Hardware Support +License: LGPLv2+ URL: http://zbar.sourceforge.net/ Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2 -Patch0: use_python3_on_python_script.patch -Patch1: fix_qt_overlinking.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: python3-gobject-devel -BuildRequires: qt5-qtbase-devel -BuildRequires: qt5-qtx11extras-devel -%if %{JAVA} -BuildRequires: java-devel -%endif -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: xmlto -BuildRequires: gobject-introspection-devel + +BuildRequires: autoconf automake libtool python-devel gettext-devel +BuildRequires: qt5-qtbase-devel qt5-qtx11extras-devel +BuildRequires: gtk2-devel pygtk2-devel GraphicsMagick-c++-devel +BuildRequires: libv4l-devel libXv-devel xmlto %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 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ Code. +A layered bar code scanning and decoding library. Supports EAN, UPC, Code 128, +Code 39 and Interleaved 2 of 5. +Includes applications for decoding captured bar code images and using a video +device (e. g., webcam) as a bar code scanner. %package devel -Summary: Bar code reader library extra development files -Requires: %{name}-libs%{_isa} = %{version}-%{release} +Group: Development/Libraries +Summary: Bar code library extra development files +Requires: pkgconfig, %{name} = %{version}-%{release} %description devel This package contains header files and additional libraries used for developing applications that read bar codes with this library. -%package libs -Summary: Bar code reader library - -%description libs -This package contains the ZBar Bar Code Reader library. - %package gtk +Group: Development/Libraries Summary: Bar code reader GTK widget -Requires: %{name}-libs%{_isa} = %{version}-%{release} -# Obsoleted in F37 -Obsoletes: %{name}-gi < %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description gtk This package contains a bar code scanning widget for use with GUI -applications based on GTK 3. +applications based on GTK+-2.0. %package gtk-devel +Group: Development/Libraries Summary: Bar code reader GTK widget extra development files -Requires: %{name}-devel%{_isa} = %{version}-%{release} -Requires: %{name}-gtk%{_isa} = %{version}-%{release} +Requires: pkgconfig, %{name}-gtk = %{version}-%{release}, %{name}-devel = %{version}-%{release} %description gtk-devel This package contains header files and additional libraries used for -developing GUI applications based on GTK 3 that include a bar code +developing GUI applications based on GTK+-2.0 that include a bar code scanning widget. +%package pygtk +Group: Development/Libraries +Summary: Bar code reader PyGTK widget +Requires: pygtk2, python2-pillow, %{name}-gtk = %{version}-%{release} + +%description pygtk +This package contains a bar code scanning widget for use in GUI +applications based on PyGTK. + %package qt +Group: Development/Libraries Summary: Bar code reader Qt widget -Requires: %{name}-libs%{_isa} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description qt This package contains a bar code scanning widget for use with GUI applications based on Qt4. %package qt-devel +Group: Development/Libraries Summary: Bar code reader Qt widget extra development files -Requires: %{name}-devel%{_isa} = %{version}-%{release} -Requires: %{name}-qt%{_isa} = %{version}-%{release} +Requires: pkgconfig, %{name}-qt = %{version}-%{release}, %{name}-devel = %{version}-%{release} %description qt-devel This package contains header files and additional libraries used for -developing GUI applications based on Qt5 that include a bar code +developing GUI applications based on Qt4 that include a bar code scanning widget. -%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 - %prep %setup -q -%patch 0 -p1 -%patch 1 -p1 %build -autoreconf -fiv -%configure --with-python=python3 --with-gtk=auto --with-dbusconfdir=%{_sysconfdir} --docdir=%{_docdir}/%{name}-%{version} --with-graphicsmagick --without-xshm --without-xv --enable-codes=ean,databar,code128,code93,code39,codabar,i25,qrcode,sqcode,pdf417 +autoreconf -vfi +%configure --without-java --with-graphicsmagick --docdir=%{_docdir}/%{name}-%{version} # rpath 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 -%make_build +make %{?_smp_mflags} %install -%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} +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" #Remove .la and .a files find ${RPM_BUILD_ROOT} -name '*.la' -or -name '*.a' | xargs rm -f # Remove installed doc -rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/ +rm -rf $RPM_BUILD_ROOT/usr/share/doc/zbar-%{version}/ -%ldconfig_scriptlets +%post -p /sbin/ldconfig -%ldconfig_scriptlets devel +%post devel -p /sbin/ldconfig -%ldconfig_scriptlets gtk +%post gtk -p /sbin/ldconfig -%ldconfig_scriptlets qt +%post qt -p /sbin/ldconfig -%find_lang zbar +%postun -p /sbin/ldconfig + +%postun devel -p /sbin/ldconfig + +%postun gtk -p /sbin/ldconfig + +%postun qt -p /sbin/ldconfig %files -%doc NEWS.md README.md INSTALL.md +%defattr(-,root,root,-) +%doc COPYING LICENSE NEWS + %{_bindir}/zbarimg %{_bindir}/zbarcam +%{_libdir}/libzbar.so.* %{_mandir}/man1/* -%{_sysconfdir}/dbus-1/system.d/org.linuxtv.Zbar.conf - -%files libs -f zbar.lang -%license COPYING LICENSE.md -%{_libdir}/libzbar.so.0* -%{_libdir}/girepository-1.0/ZBar-1.0.typelib %files devel -%doc HACKING.md TODO.md +%defattr(-,root,root,-) +%doc HACKING TODO + %{_libdir}/libzbar.so %{_libdir}/pkgconfig/zbar.pc %dir %{_includedir}/zbar @@ -184,206 +144,41 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/ %{_includedir}/zbar/Video.h %{_includedir}/zbar/Window.h %{_includedir}/zbar/Processor.h -%{_datadir}/gir-1.0/ZBar-1.0.gir %files gtk +%defattr(-,root,root,-) %{_libdir}/libzbargtk.so.* %{_bindir}/zbarcam-gtk %files gtk-devel +%defattr(-,root,root,-) %{_libdir}/libzbargtk.so %{_libdir}/pkgconfig/zbar-gtk.pc %{_includedir}/zbar/zbargtk.h +%files pygtk +%defattr(-,root,root,-) +%{python_sitearch}/zbarpygtk.so +%{python_sitearch}/zbar.so + %files qt +%defattr(-,root,root,-) %{_libdir}/libzbarqt.so.* %{_bindir}/zbarcam-qt %files qt-devel +%defattr(-,root,root,-) %{_libdir}/libzbarqt.so %{_libdir}/pkgconfig/zbar-qt.pc %{_includedir}/zbar/QZBar*.h -%if %{JAVA} -%files java -%{_jnidir}/zbar.jar -%{_libdir}/libzbarjni.so* -%endif - -%files -n python3-zbar -%{python3_sitearch}/zbar.so -%{_docdir}/test_python.py - %changelog -* Tue Aug 04 2026 Gwyn Ciesla - 0.23.93-13 -- Rebuild for Python 3.15.0b4 - -* Fri Jul 17 2026 Fedora Release Engineering - 0.23.93-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Wed Jun 03 2026 Python Maint - 0.23.93-11 -- Rebuilt for Python 3.15 - -* Sat Jan 17 2026 Fedora Release Engineering - 0.23.93-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Fri Sep 05 2025 Yaakov Selkowitz - 0.23.93-9 -- Fix Qt overlinking - -* Fri Jul 25 2025 Fedora Release Engineering - 0.23.93-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Tue Jun 03 2025 Python Maint - 0.23.93-7 -- Rebuilt for Python 3.14 - -* Sun Jan 19 2025 Fedora Release Engineering - 0.23.93-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Sat Jul 20 2024 Fedora Release Engineering - 0.23.93-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jun 07 2024 Python Maint - 0.23.93-4 -- Rebuilt for Python 3.13 - -* Mon Apr 15 2024 Gwyn Ciesla - 0.23.93-3 -- Update python3-gobject BuildRequires - -* Sat Jan 27 2024 Fedora Release Engineering - 0.23.93-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Tue Jan 09 2024 Gwyn Ciesla - 0.23.93-1 -- 0.23.93 - -* Fri Jan 05 2024 Florian Weimer - 0.23.90-12 -- Add missing Py_SIZE to py311.patch - -* Sat Jul 22 2023 Fedora Release Engineering - 0.23.90-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Fri Jul 07 2023 Michael J Gruber - 0.23.90-10 -- Fix FTBFS with python 3.12 (rhbz#2220630) - -* Thu Jun 15 2023 Python Maint - 0.23.90-9 -- Rebuilt for Python 3.12 - -* Wed Mar 01 2023 Gwyn Ciesla - 0.23.90-8 -- migrated to SPDX license - -* Sat Jan 21 2023 Fedora Release Engineering - 0.23.90-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Dec 21 2022 Gwyn Ciesla - 0.23.90-6 -- BR setuptools - -* Fri Aug 26 2022 Kalev Lember - 0.23.90-5 -- Misc packaging cleanup -- Sort BuildRequires and Requires and split them out one per line -- Move GObject Introspection bindings to -gtk and -gtk-devel subpackages -- Split libzbar out to zbar-libs subpackage -- Tighten subpackage deps with %%{_isa} -- Drop manual requires on pkgconfig and rely on rpm dep extractor -- Rename zbar-python3 to python3-zbar as per latest Python guidelines -- Use make_build and make_install macros - -* Mon Aug 01 2022 Gwyn Ciesla - 0.23.90-4 -- Only build Java on supported platforms. - -* Sat Jul 23 2022 Fedora Release Engineering - 0.23.90-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 0.23.90-2 -- Rebuilt for Python 3.11 - -* Tue May 31 2022 Gwyn Ciesla - 0.23.90-1 -- 0.23.90 - -* Sat Feb 05 2022 Jiri Vanek - 0.23-14 -- Rebuilt for java-17-openjdk as system jdk - -* Sat Jan 22 2022 Fedora Release Engineering - 0.23-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Jan 12 2022 Gwyn Ciesla - 0.23-12 -- Fix 3.11 FTBFS. - -* Fri Jul 23 2021 Fedora Release Engineering - 0.23-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 0.23-10 -- Rebuilt for Python 3.10 - -* Thu Mar 25 2021 Gwyn Ciesla - 0.23-9 -Fix FTBFS for autoconf 2.71. - -* Thu Jan 28 2021 Fedora Release Engineering - 0.23-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 0.23-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jul 20 2020 Gwyn Ciesla - 0.23-6 -- Update description. -- Patch for Python 3.9. -- Move back to GraphicsMagick. - -* Tue May 26 2020 Miro Hrončok - 0.23-5 -- Rebuilt for Python 3.9 - -* Fri Jan 31 2020 Fedora Release Engineering - 0.23-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Mon Aug 19 2019 Miro Hrončok - 0.23-3 -- Rebuilt for Python 3.8 - -* Sat Jul 27 2019 Fedora Release Engineering - 0.23-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Thu May 23 2019 Mauro Carvalho Chehab - 0.23-1 -- Bump to release 0.23. - - -* Tue May 14 2019 Mauro Carvalho Chehab - 0.22.92-1 -- Third release candidate for 0.23. - -* Fri May 10 2019 Mauro Carvalho Chehab - 0.22.90-1 -- Release candidate for 0.23. Support for Gtk3 and GObject Introspection (GIR) - -* Mon Apr 29 2019 Mauro Carvalho Chehab - 0.22.2-1 -- Update to 0.22.2: added support for Java 11 - -* Wed Feb 20 2019 Mauro Carvalho Chehab - 0.22-1 -- Bump to version 0.22: zbarcam-qt is now a full-featured application - -* Tue Feb 12 2019 Mauro Carvalho Chehab - 0.21-1 -- Bump to version 0.21: d-bus and SQ code support, improved zbarcam-qt - -* Sun Feb 03 2019 Fedora Release Engineering - 0.20.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jan 7 2019 Mauro Carvalho Chehab - 0.20.1-4 -- Disable python2 bindings due to pygtk2 orphaned package - -* Thu Aug 9 2018 Hans de Goede - 0.20.1-3 -- Drop zbar_fedora29_hack_for_codegen_to_work.patch now that pygobject2 is - fixed (rhbz# 1606784) -- Use %%ldconfig_scriptlets so that we don't unnecessarily run ldconfig on F28+ - -* Wed Aug 08 2018 Mauro Carvalho Chehab - 0.20.1-2 -- Re-enable python2 bindings - * Wed Aug 08 2018 Mauro Carvalho Chehab - 0.20.1-1 - Bump version to 0.20.1 * Tue Aug 07 2018 Mauro Carvalho Chehab - 0.20-8 - Fix python 2 dependencies -* Sat Jul 14 2018 Fedora Release Engineering - 0.20-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 14 2018 Iryna Shcherbina - 0.20-6 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - * Fri Feb 09 2018 Fedora Release Engineering - 0.20-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild