File rosa-imagewriter.spec of Package rosa-imagewriter
#
# spec file for package rosa-imagewriter
#
# Copyright (c) 2020 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 _name RosaImageWriter
Name: rosa-imagewriter
Version: 2.6.2.0
Release: 0
Summary: Utility for writing raw disk images and hybrid isos to USB keys
License: GPL-3.0-only
Group: System/X11/Utilities
URL: https://abf.io/soft/rosa-imagewriter
Source: %{name}-%{version}.tar.gz
Source1: %{name}.desktop
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(libudev)
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200
BuildRequires: rsvg-convert
%else
BuildRequires: rsvg-view
%endif
Recommends: %{name}-lang
%description
Utility for writing raw disk images and hybrid isos to USB keys.
Based on SUSE Studio Imagewriter.
%lang_package
%debug_package
%prep
%setup -q
%build
lrelease-qt5 %{_name}.pro
%qmake5
%make_build
%install
#qmake5_install
install -Dm 0755 %{_name} %{buildroot}%{_libdir}/%{name}/%{name}
install -dm 0755 %{buildroot}%{_bindir}
ln -sf %{_libdir}/%{name}/%{name} %{buildroot}%{_bindir}/%{name}
install -Dm 0644 res/src/USB_flash_drive.svg %{buildroot}%{_datadir}/pixmaps/%{name}.svg
rsvg-convert -h 48 -w 48 res/src/USB_flash_drive.svg -o %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -dm 0755 %{buildroot}%{_datadir}/%{name}/lang
install -Dm 0644 lang/*.qm %{buildroot}%{_datadir}/%{name}/lang/
mkdir -p %{buildroot}%{_datadir}/applications/
install -D -m 0644 %{_sourcedir}/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
echo -e 'Keywords=iso;disk;usb;dvd;\nMimeType=application/x-cd-image;application/x-raw-disk-image;' >> \
%{buildroot}%{_datadir}/applications/%{name}.desktop
%files
%doc doc/*.html
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.??g
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/%{name}
%files lang
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/lang
%{_datadir}/%{name}/lang/*.qm
%changelog