File imagewriter.spec of Package imagewriter

# spec file for package imagewriter
# Copyright (c) 2017 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

Name:           imagewriter
Version:        0.9
Release:        0
Summary:        Write openSUSE to media
License:        GPL-3.0
Group:          Hardware/Other
Source:         %{name}-%{version}.tar.xz
BuildRequires:  hicolor-icon-theme
Requires:       hicolor-icon-theme
%if  0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
BuildRequires:  qt5-qtbase-devel >= 5.6
BuildRequires:  qt5-qtdeclarative-devel
Requires:       qt5-qtquickcontrols
BuildRequires:  libqt5-qtbase-devel >= 5.6
BuildRequires:  libqt5-qtdeclarative-devel
Requires:       libqt5-qtquickcontrols
Requires:       udisks2
Requires:       cdrecord
Requires:       polkit

The openSUSE Image Writer is a tool that automates downloading and writing
of openSUSE images to media.

%setup -q

qmake-qt5 \
  QMAKE_CXXFLAGS="%{optflags}" \
  QMAKE_CFLAGS="%{optflags}" \
  QMAKE_LFLAGS="-Wl,--as-needed -Wl,--no-undefined" \
make %{?_smp_mflags}

make %{?_smp_mflags} DESTDIR=%{buildroot} install INSTALL_ROOT=%{buildroot}