File qpxtool.spec of Package qpxtool

# spec file for package qpxtool
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define major 0

Name:           qpxtool
Version:        0.7.2
Release:        0
License:        GPL-2.0+
Summary:        CD/DVD Drive Quality Testsuite
Group:          Productivity/Multimedia/CD/Record
# PATCH-FIX-OPENSUSE qpxtool-0.7.2-optflags.patch -- use optimization flags and don't strip binaries
Patch0:         qpxtool-0.7.2-optflags.patch
# PATCH-FIX-UPSTREAM qpxtool-0.7.2-configure_png.patch sf#3597215 -- fix linker options
Patch1:         qpxtool-0.7.2-configure_png.patch
# PATCH-FIX-UPSTREAM qpxtool-0.7.2-no_return.patch sf#3597217 -- fix no-return-in-nonvoid-function error
Patch2:         qpxtool-0.7.2-no_return.patch
# PATCH-FIX-UPSTREAM qpxtool-0.7.0-libpng15.patch sf#3597216 -- fix build against libpng15
Patch3:         qpxtool-0.7.0-libpng15.patch
BuildRequires:  ImageMagick
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(QtCore)
BuildRequires:  pkgconfig(QtGui)
BuildRequires:  pkgconfig(QtNetwork)
BuildRequires:  pkgconfig(QtSql)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

QPxTool is the linux way to get full control over your CD/DVD drives.
It is the Open Source Solution which intends to give you access to all
available Quality Checks (Q-Checks) on written and blank media, that are
available for your drive. This will help you to find the right media and
the optimized writing speed for your hardware, which will increase
the chance for a long data lifetime.

%package gui
Summary:        QPxTool Front-end
Group:          Productivity/Multimedia/CD/Record
Requires:       %{name} = %{version}

%description gui
Qt4 GUI for the package QPxTool.

%package -n libqpx%{major}
Summary:        QPxTool Libraries
Group:          System/Libraries

%description -n libqpx%{major}
Libraries for the package QPxTool.

%package -n libqpx-devel
Summary:        QPxTool Development Files
Group:          Development/Libraries/C and C++
Requires:       libqpx%{major} = %{version}

%description -n libqpx-devel
QPxTool libraries and header files.

%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1

export OPTFLAGS="%{optflags} -fno-strict-aliasing"
./configure \
    --prefix=%{_prefix} \
    --libdir=%{_libdir} \
make %{?_smp_mflags}

rm -f %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -Dm 0644 gui/images/q.png \
for size in 48x48 32x32 22x22 16x16 ; do
    install -dm 0755 \
    convert -resize ${size} gui/images/q.png \
%suse_update_desktop_file -i -r %{name} AudioVideo CD Qt

%post -n libqpx%{major} -p /sbin/ldconfig

%postun -n libqpx%{major} -p /sbin/ldconfig

%post gui

%postun gui

%doc AUTHORS ChangeLog COPYING README TODO status.html SupportedDevices
%attr(0750,root,cdrom) %{_sbindir}/pxfw
%attr(0750,root,cdrom) %{_bindir}/cdvdcontrol
%attr(0750,root,cdrom) %{_bindir}/f1tattoo
%attr(0750,root,cdrom) %{_bindir}/qscan
%attr(0750,root,cdrom) %{_bindir}/readdvd
%doc %{_mandir}/man?/*

%files gui

%files -n libqpx%{major}

%files -n libqpx-devel
%doc AUTHORS ChangeLog COPYING README TODO status.html SupportedDevices