Accepting request 400695 from home:dimstar:branches:Application:Geo

Clean up spec file for inclusion into openSUSE - gstreamer would need the zbar module in order for a new package to be introduced to make use of it - please forward

OBS-URL: https://build.opensuse.org/request/show/400695
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/zbar?expand=0&rev=15
This commit is contained in:
Martin Pluskal 2016-06-08 14:42:39 +00:00 committed by Git OBS Bridge
parent c859fe3d28
commit 6b6fbc2d9c
2 changed files with 69 additions and 70 deletions

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Wed Jun 8 13:15:49 UTC 2016 - dimstar@opensuse.org
- Cleanup specfile for inclusion into openSUSE:
+ Use upstream provided tarball.
+ The devel packages follow the library basename, not the shared
library packaging name (not parallel installable).
+ Groups for SLPP packages is System/Libraries.
+ The various devel-packages are auto-depending on each other
based on the .pc files.
+ Move autoreconf call to build phase.
+ Pass --disable-static to configure instead of deleting the
static libs in the end again.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 28 17:29:29 UTC 2013 - opensuse@dstoecker.de Thu Feb 28 17:29:29 UTC 2013 - opensuse@dstoecker.de

125
zbar.spec
View File

@ -1,8 +1,8 @@
# #
# spec file for package zbar # spec file for package zbar
# #
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright 2010 Carlos Goncalves <cgoncalves@opensuse.org>. # Copyright (c) 2010 Carlos Goncalves <cgoncalves@opensuse.org>.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -18,7 +18,6 @@
%define libname libzbar0 %define libname libzbar0
Name: zbar Name: zbar
Version: 0.10_2013_02_28 Version: 0.10_2013_02_28
Release: 0 Release: 0
@ -26,19 +25,19 @@ Summary: Bar code reader
License: LGPL-2.1+ License: LGPL-2.1+
Group: Productivity/Other Group: Productivity/Other
Url: http://zbar.sourceforge.net Url: http://zbar.sourceforge.net
Source: %{name}-%{version}.tar.bz2
Patch1: fix_build.patch
Patch2: fix-gcc5.patch
BuildRequires: ImageMagick-devel BuildRequires: ImageMagick-devel
BuildRequires: gtk2-devel
BuildRequires: libqt4-devel
BuildRequires: python-gtk-devel
# required by mercurial archive only # required by mercurial archive only
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: gtk2-devel
BuildRequires: libqt4-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: python-gtk-devel
BuildRequires: xmlto BuildRequires: xmlto
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch1: fix_build.patch
Patch2: fix-gcc5.patch
%description %description
ZBar is an open source software suite for reading bar codes from various ZBar is an open source software suite for reading bar codes from various
@ -55,20 +54,17 @@ embedded use.
%package -n %{libname} %package -n %{libname}
Summary: ZBar library Summary: ZBar library
Group: Development/Libraries/C and C++ Group: System/Libraries
Provides: lib%{name}
%description -n %{libname} %description -n %{libname}
This package provides the ZBar library. This package provides the ZBar library.
%package -n %{libname}-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++ Group: Development/Libraries/C and C++
Provides: lib%{name}-devel
Requires: %{libname} = %{version} Requires: %{libname} = %{version}
Requires: pkgconfig
%description -n %{libname}-devel %description -n lib%{name}-devel
This package contains all necessary include files, libraries, This package contains all necessary include files, libraries,
configuration files and development tools needed to compile and link configuration files and development tools needed to compile and link
applications using the zbar library. applications using the zbar library.
@ -76,50 +72,41 @@ applications using the zbar library.
%package -n python-zbar %package -n python-zbar
Summary: ZBar Python bindings Summary: ZBar Python bindings
Group: Productivity/Other Group: Productivity/Other
Requires: %{libname} = %{version} %py_requires
%{py_requires}
%description -n python-zbar %description -n python-zbar
This package provides ZBar Python bindings. This package provides ZBar Python bindings.
%package -n libzbarqt0 %package -n libzbarqt0
Summary: ZBar Qt bindings Summary: ZBar Qt bindings
Group: Productivity/Other Group: System/Libraries
Requires: %{libname} = %{version}
%description -n libzbarqt0 %description -n libzbarqt0
This package provides ZBar Qt bindings. This package provides ZBar Qt bindings.
%package -n libzbarqt0-devel %package -n libzbarqt-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++ Group: Development/Libraries/C and C++
Provides: lib%{name}qt-devel
Requires: lib%{name}-devel
Requires: libzbarqt0 = %{version} Requires: libzbarqt0 = %{version}
Requires: pkgconfig
%description -n libzbarqt0-devel %description -n libzbarqt-devel
This package contains all necessary include files, libraries, This package contains all necessary include files, libraries,
configuration files and development tools needed to compile and link configuration files and development tools needed to compile and link
applications using the zbar-qt library. applications using the zbar-qt library.
%package -n libzbargtk0 %package -n libzbargtk0
Summary: ZBar Gtk bindings Summary: ZBar Gtk bindings
Group: Productivity/Other Group: System/Libraries
Requires: %{libname} = %{version}
%description -n libzbargtk0 %description -n libzbargtk0
This package provides ZBar Gtk bindings. This package provides ZBar Gtk bindings.
%package -n libzbargtk0-devel %package -n libzbargtk-devel
Summary: Development environment for the ZBar Gtk bindings library Summary: Development environment for the ZBar Gtk bindings library
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Provides: lib%{name}gtk-devel
Requires: lib%{name}-devel
Requires: libzbargtk0 = %{version} Requires: libzbargtk0 = %{version}
Requires: pkgconfig
%description -n libzbargtk0-devel %description -n libzbargtk-devel
This package contains all necessary include files, libraries, This package contains all necessary include files, libraries,
configuration files and development tools needed to compile and link configuration files and development tools needed to compile and link
applications using the zbar-gtk library. applications using the zbar-gtk library.
@ -128,7 +115,7 @@ applications using the zbar-gtk library.
Summary: ZBar Python-Gtk bindings Summary: ZBar Python-Gtk bindings
Group: Productivity/Other Group: Productivity/Other
Requires: python-zbar = %{version} Requires: python-zbar = %{version}
%{py_requires} %py_requires
%description -n python-zbar-gtk %description -n python-zbar-gtk
This package provides ZBar Python-Gtk bindings. This package provides ZBar Python-Gtk bindings.
@ -137,51 +124,49 @@ This package provides ZBar Python-Gtk bindings.
%setup -q %setup -q
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
# for the Mercurial-based archive we need to get proper autoconf files
autoreconf -fi
%build %build
# for the Mercurial-based archive we need to get proper autoconf files
autoreconf -fi
# Mercurial only? - This should not be required in a final release version! # Mercurial only? - This should not be required in a final release version!
export CFLAGS="$RPM_OPT_FLAGS -Wno-error=parentheses -Wno-error=deprecated-declarations" export CFLAGS="%{optflags} -Wno-error=parentheses -Wno-error=deprecated-declarations"
%configure --docdir=%{_docdir}/%{name} %configure --docdir=%{_docdir}/%{name} --disable-static
make %{?jobs:-j%jobs} make %{?_smp_mflags}
%install %install
%makeinstall make %{?_smp_mflags} DESTDIR=%{buildroot} install
rm ${RPM_BUILD_ROOT}/usr/share/doc/packages/zbar/INSTALL rm %{buildroot}%{_docdir}/zbar/INSTALL
find ${RPM_BUILD_ROOT} -name '*.la' -or -name '*.a' | xargs rm -f find %{buildroot} -name '*.la' -delete
%clean
rm -rf $RPM_BUILD_ROOT
%post -n %{libname} -p /sbin/ldconfig %post -n %{libname} -p /sbin/ldconfig
%post -n libzbarqt0 -p /sbin/ldconfig
%post -n libzbargtk0 -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig
%post -n libzbarqt0 -p /sbin/ldconfig
%postun -n libzbarqt0 -p /sbin/ldconfig %postun -n libzbarqt0 -p /sbin/ldconfig
%post -n libzbargtk0 -p /sbin/ldconfig
%postun -n libzbargtk0 -p /sbin/ldconfig %postun -n libzbargtk0 -p /sbin/ldconfig
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc ChangeLog README COPYING LICENSE NEWS %doc ChangeLog README COPYING LICENSE NEWS
%_bindir/zbar* %{_bindir}/zbar*
%doc %{_mandir}/man1/* %{_mandir}/man1/*
%files -n %{libname} %files -n %{libname}
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libzbar.so.0.2.0 %{_libdir}/libzbar.so.0.2.0
%files -n %{libname}-devel %files -n lib%{name}-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %_includedir/%{name} %dir %{_includedir}/%{name}
%_includedir/zbar.h %{_includedir}/zbar.h
%_includedir/%{name}/*.h %{_includedir}/%{name}/*.h
%exclude %_includedir/%{name}/zbargtk.h %exclude %{_includedir}/%{name}/zbargtk.h
%exclude %_includedir/%{name}/QZBar*.h %exclude %{_includedir}/%{name}/QZBar*.h
%_libdir/libzbar.so %{_libdir}/libzbar.so
%_libdir/libzbar.so.0 %{_libdir}/libzbar.so.0
%_libdir/pkgconfig/zbar.pc %{_libdir}/pkgconfig/zbar.pc
%files -n python-zbar %files -n python-zbar
%defattr(-,root,root) %defattr(-,root,root)
@ -189,25 +174,25 @@ rm -rf $RPM_BUILD_ROOT
%files -n libzbarqt0 %files -n libzbarqt0
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libzbarqt.so.0.0.2 %{_libdir}/libzbarqt.so.0.0.2
%files -n libzbarqt0-devel %files -n libzbarqt-devel
%defattr(-,root,root) %defattr(-,root,root)
%_includedir/%{name}/QZBar*.h %{_includedir}/%{name}/QZBar*.h
%_libdir/libzbarqt.so %{_libdir}/libzbarqt.so
%_libdir/libzbarqt.so.0 %{_libdir}/libzbarqt.so.0
%_libdir/pkgconfig/zbar-qt.pc %{_libdir}/pkgconfig/zbar-qt.pc
%files -n libzbargtk0 %files -n libzbargtk0
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libzbargtk.so.0.0.2 %{_libdir}/libzbargtk.so.0.0.2
%files -n libzbargtk0-devel %files -n libzbargtk-devel
%defattr(-,root,root) %defattr(-,root,root)
%_includedir/%{name}/zbargtk.h %{_includedir}/%{name}/zbargtk.h
%_libdir/libzbargtk.so %{_libdir}/libzbargtk.so
%_libdir/libzbargtk.so.0 %{_libdir}/libzbargtk.so.0
%_libdir/pkgconfig/zbar-gtk.pc %{_libdir}/pkgconfig/zbar-gtk.pc
%files -n python-zbar-gtk %files -n python-zbar-gtk
%defattr(-,root,root) %defattr(-,root,root)