File qpxtool.spec of Package qpxtool
#
# spec file for package qpxtool
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define major 0
%{?sle15_python_module_pythons}
Name: qpxtool
Version: 0.8.1
Release: 0
Summary: CD/DVD Drive Quality Testsuite
License: GPL-2.0-or-later
Group: Productivity/Multimedia/CD/Record
URL: https://qpxtool.sourceforge.net
Source0: https://downloads.sourceforge.net/qpxtool/%{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE qpxtool-0.7.2-optflags.patch lazy.kent@opensuse.org -- use optimization flags and don't strip binaries
Patch0: qpxtool-0.7.2-optflags.patch
# PATCH-FIX-UPSTREAM qpxtool-0.7.2-no_return.patch sf#3597217 lazy.kent@opensuse.org -- fix no-return-in-nonvoid-function error
Patch2: qpxtool-0.7.2-no_return.patch
# PATCH-FIX-OPENSUSE -- use lrelease-qt instead lrelease
Patch4: %{name}-lrelease.patch
# PATCH-FIX-OPENSUSE -- fix wrong version
Patch5: %{name}-version.patch
# PATCH-FIX-OPENSUSE -- qscan needs root rights
Patch6: %{name}-desktop.patch
# PATCH-FIX-OPENSUSE -- 0001-Fix-check-whether-Tab-should-be-selected.patch -- fix check whether tab should be selected
Patch7: 0001-Fix-check-whether-Tab-should-be-selected.patch
BuildRequires: ImageMagick
BuildRequires: hicolor-icon-theme
BuildRequires: libpng-devel
BuildRequires: pkgconfig
BuildRequires: %{python_module qt5-devel}
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5UiTools)
%description
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
Qt5 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.
%prep
%autosetup -p1
%build
export OPTFLAGS="%{optflags} -fno-strict-aliasing"
./configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--bindir=%{_bindir} \
--sbindir=%{_sbindir}
%make_build
%install
%make_install
rm %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -Dm 0644 gui/images/q.png \
%{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
for size in 48x48 32x32 22x22 16x16 ; do
install -dm 0755 \
%{buildroot}%{_datadir}/icons/hicolor/${size}/apps
convert -resize ${size} gui/images/q.png \
%{buildroot}%{_datadir}/icons/hicolor/${size}/apps/%{name}.png
done
%suse_update_desktop_file -i -r %{name} AudioVideo CD Qt
%ldconfig_scriptlets -n libqpx%{major}
%files
%license COPYING
%doc ChangeLog README status.html SupportedDevices
%{_bindir}/qscand
%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
%{_libdir}/%{name}/
%{_mandir}/man?/*.?%{?ext_man}
%files gui
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/*/%{name}.png
%files -n libqpx%{major}
%{_libdir}/libqpx*.so.%{major}*
%files -n libqpx-devel
%{_includedir}/%{name}/
%{_libdir}/libqpx*.so
%changelog