File ddrescueview.spec of Package ddrescueview
#
# spec file for package ddrescueview
#
# Copyright (c) 2018 SUSE LINUX 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 http://bugs.opensuse.org/
#
%define upstream_version_1 0.4%20alpha%203
%define upstream_version_2 0.4%7Ealpha3
Name: ddrescueview
Version: 0.4~alpha3
Release: 0
Summary: Graphical viewer for GNU ddrescue mapfiles
License: GPL-3.0
Group: Productivity/Archiving/Backup
Url: https://sourceforge.net/projects/ddrescueview/
Source: https://sourceforge.net/projects/ddrescueview/files/Test%20builds/v%{upstream_version_1}/ddrescueview-source-%{upstream_version_2}.tar.xz/download#/%{name}-%{version}.tar.xz
Source1: %{name}.desktop
BuildRequires: gtk2-devel
BuildRequires: lazarus
BuildRequires: update-desktop-files
BuildRequires: dos2unix
BuildRequires: libQt5Pas-devel
%description
This small tool allows the user to graphically examine ddrescue's map files in a user friendly GUI application. The Main window displays a block grid with each block's color representing the block types it contains. Many people know this type of view from defragmentation programs.
%prep
%setup -q -n source
chmod -x ../*.txt
%build
lazbuild \
--lazarusdir=%{_libdir}/lazarus \
%ifarch x86_64
--cpu=x86_64 \
%endif
--widgetset=qt5 \
-B ddrescueview.lpi \
&& [ -f ddrescueview ]
dos2unix ../*.txt
%install
install -Dm 755 ddrescueview %{buildroot}%{_bindir}/%{name}
install -Dm 644 ../resources/linux/ddrescueview.1 %{buildroot}%{_mandir}/man1/%{name}.1
install -Dm 644 ../resources/linux/ddrescueview.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
install -Dm 644 %{S:1} %{buildroot}%{_datadir}/applications/%{name}.desktop
%files
%license ../gpl.txt
%doc ../readme.txt ../changelog.txt
%{_mandir}/man1/%{name}.1%{?ext_man}
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.xpm
%changelog