- Modernise spec file

- Split lang subpackage

OBS-URL: https://build.opensuse.org/package/show/Application:Geo/zbar?expand=0&rev=55
This commit is contained in:
Martin Pluskal 2023-06-20 11:25:01 +00:00 committed by Git OBS Bridge
parent fb2cb5923e
commit de4a119d29
2 changed files with 13 additions and 18 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jun 20 11:21:51 UTC 2023 - Martin Pluskal <mpluskal@suse.com>
- Modernise spec file
- Split lang subpackage
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Apr 28 08:21:42 UTC 2023 - Dirk Müller <dmueller@suse.com> Fri Apr 28 08:21:42 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -24,7 +24,6 @@ Version: 0.23.90
Release: 0 Release: 0
Summary: Bar code reader Summary: Bar code reader
License: LGPL-2.0-or-later License: LGPL-2.0-or-later
Group: Productivity/Other
URL: https://github.com/mchehab/zbar URL: https://github.com/mchehab/zbar
Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2 Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2
Source98: baselibs.conf Source98: baselibs.conf
@ -46,9 +45,7 @@ BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xv) BuildRequires: pkgconfig(xv)
%if 0%{?suse_version} < 1500 %lang_package
BuildRequires: gcc7
%endif
%description %description
ZBar reads bar codes from various sources, such as video streams, ZBar reads bar codes from various sources, such as video streams,
@ -61,7 +58,6 @@ or integrated by other programs through a library.
%package -n %{libname} %package -n %{libname}
Summary: Bar code reading library Summary: Bar code reading library
Group: System/Libraries
%description -n %{libname} %description -n %{libname}
ZBar reads bar codes from various sources, such as video streams, ZBar reads bar codes from various sources, such as video streams,
@ -73,7 +69,6 @@ This package provides the ZBar library.
%package -n lib%{name}-devel %package -n lib%{name}-devel
Summary: Development environment for the ZBar library Summary: Development environment for the ZBar library
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version} Requires: %{libname} = %{version}
%description -n lib%{name}-devel %description -n lib%{name}-devel
@ -83,14 +78,12 @@ applications using the zbar library.
%package -n lib%{name}qt0 %package -n lib%{name}qt0
Summary: ZBar Qt bindings Summary: ZBar Qt bindings
Group: System/Libraries
%description -n lib%{name}qt0 %description -n lib%{name}qt0
This package provides ZBar Qt bindings. This package provides ZBar Qt bindings.
%package -n lib%{name}qt-devel %package -n lib%{name}qt-devel
Summary: Development environment for the ZBar Qt bindings library Summary: Development environment for the ZBar Qt bindings library
Group: Development/Libraries/C and C++
Requires: lib%{name}-devel = %{version} Requires: lib%{name}-devel = %{version}
Requires: lib%{name}qt0 = %{version} Requires: lib%{name}qt0 = %{version}
@ -101,7 +94,6 @@ applications using the zbar-qt library.
%package -n python3-zbar %package -n python3-zbar
Summary: Python3 module for ZBar Summary: Python3 module for ZBar
Group: Development/Languages/Python
%description -n python3-zbar %description -n python3-zbar
This package contains the module to use ZBar from python3. This package contains the module to use ZBar from python3.
@ -110,9 +102,6 @@ This package contains the module to use ZBar from python3.
%autosetup -p1 %autosetup -p1
%build %build
test -x "$(type -p gcc)" && export CC=$_
test -x "$(type -p gcc-7)" && export CC=$_
test -x "$(type -p gcc-8)" && export CC=$_
%configure \ %configure \
--docdir=%{_docdir}/%{name} \ --docdir=%{_docdir}/%{name} \
--disable-static \ --disable-static \
@ -127,16 +116,14 @@ find %{buildroot} -name "*.la" -or -name "*.a" | xargs rm -f
rm -rf %{buildroot}%{_datadir}/doc/zbar-%{version}/ rm -rf %{buildroot}%{_datadir}/doc/zbar-%{version}/
rm -f %{buildroot}%{_docdir}/zbar/{COPYING,LICENSE.md,INSTALL.md} rm -f %{buildroot}%{_docdir}/zbar/{COPYING,LICENSE.md,INSTALL.md}
%{find_lang} %{name} %find_lang %{name}
# Lets wait for review first # Lets wait for review first
rm -rf %{buildroot}%{_sysconfdir}/dbus-1/system.d/org.linuxtv.Zbar.conf rm -rf %{buildroot}%{_sysconfdir}/dbus-1/system.d/org.linuxtv.Zbar.conf
%post -n %{libname} -p /sbin/ldconfig %ldconfig_scriptlets -n %{libname}
%postun -n %{libname} -p /sbin/ldconfig %ldconfig_scriptlets -n libzbarqt0
%post -n libzbarqt0 -p /sbin/ldconfig
%postun -n libzbarqt0 -p /sbin/ldconfig
%files -f %{name}.lang %files
%license COPYING LICENSE.md %license COPYING LICENSE.md
%{_defaultdocdir}/%{name}/ %{_defaultdocdir}/%{name}/
%{_bindir}/zbarimg %{_bindir}/zbarimg
@ -144,6 +131,8 @@ rm -rf %{buildroot}%{_sysconfdir}/dbus-1/system.d/org.linuxtv.Zbar.conf
%{_bindir}/zbarcam-qt %{_bindir}/zbarcam-qt
%{_mandir}/man1/* %{_mandir}/man1/*
%files lang -f %{name}.lang
%files -n %{libname} %files -n %{libname}
%{_libdir}/libzbar.so.%{sover}* %{_libdir}/libzbar.so.%{sover}*