File imagewriter.spec of Package imagewriter
#
# spec file for package imagewriter
#
# Copyright (c) 2016 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/
#
Name: imagewriter
Version: 1.10
Release: 0
Summary: Utility for writing disk images to USB keys
License: GPL-2.0
Group: Hardware/Other
Url: https://github.com/openSUSE/imagewriter
Source: %{name}-%{version}.tar.xz
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(udisks2)
BuildRequires: update-desktop-files
Requires: xdg-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A graphical utility for writing raw disk images & hybrid ISOs to USB keys.
%prep
%setup -q
sed -i 's|\(Exec=\)|\1xdg-su -c \"/usr/bin/|;/Exec/s|$|\"|' %{name}.desktop
%build
%qmake5 DEFINES=USEUDISKS2 PREFIX=%{_prefix} \
QMAKE_CXXFLAGS_RELEASE="%{optflags} -DKIOSKHACK"
make %{?_smp_mflags}
%install
%qmake5_install
%suse_update_desktop_file %{name}
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%doc README.md COPYING
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%{_mandir}/man?/%{name}.?%{?ext_man}
%changelog