@ -9,8 +9,9 @@ Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2
BuildRequires: autoconf automake libtool gettext-devel
BuildRequires: qt5-qtbase-devel qt5-qtx11extras-devel
BuildRequires: gtk2-devel GraphicsMagick-c++ -devel
BuildRequires: gtk2-devel ImageMagick -devel
BuildRequires: libv4l-devel libXv-devel xmlto dbus-devel
BuildRequires: java-11-openjdk-devel
%description
A layered bar code scanning and decoding library. Supports EAN, UPC, Code 128,
@ -60,12 +61,21 @@ This package contains header files and additional libraries used for
developing GUI applications based on Qt4 that include a bar code
scanning widget.
%package java
Summary: Bar code reader Java library
Requires: pkgconfig, %{name}-gtk = %{version}-%{release}, %{name}-devel = %{version}-%{release}
%description java
This package contains header files and additional libraries used for
on Java Native Interface (JNI) applications using ZBar.
%prep
%setup -q
%build
autoreconf -vfi
%configure --without-java --with-graphicsmagick --without-python2 --docdir=%{_docdir}/%{name}-%{version}
%configure --without-python2 --docdir=%{_docdir}/%{name}-%{version}
# rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
@ -76,6 +86,9 @@ make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
install -d %{buildroot}%{_jnidir}
mv %{buildroot}%{_datadir}/zbar/lib/zbar.jar %{buildroot}%{_jnidir}
mv %{buildroot}%{_datadir}/zbar/lib/libzbarjni.so* %{buildroot}%{_libdir}
#Remove .la and .a files
find ${RPM_BUILD_ROOT} -name '*.la' -or -name '*.a' | xargs rm -f
@ -136,6 +149,10 @@ rm -rf $RPM_BUILD_ROOT/usr/share/doc/zbar-%{version}/
%{_libdir}/pkgconfig/zbar-qt.pc
%{_includedir}/zbar/QZBar*.h
%files java
%{_jnidir}/zbar.jar
%{_libdir}/libzbarjni.so*
%changelog
* Mon Apr 29 2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org> - 0.22.2-1
- Update to 0.22.2: added support for Java 11