File rpi-imager.spec of Package rpi-imager

#
# spec file for package rpi-imager
#
# Copyright (c) 2018 PragmaticLinux <info@pragmaticlinux.com>
#
# 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.

Name:           rpi-imager
Summary:        Raspberry Pi Imager
Version:        1.7.5
Release:        1
URL:            https://github.com/raspberrypi/rpi-imager
Source0:        %{name}_%{version}.orig.tar.gz
License:        Apache-2.0
Group:          Hardware/Other
%if 0%{?suse_version}
# Program doesn't start without this package on Leap 15.x (disabled RPMLINT warning).
Requires:       libqt5-qtquickcontrols
Requires:       libqt5-qtquickcontrols2
%endif
%if 0%{?fedora_version}
Requires:       qt5-qtquickcontrols
Requires:       qt5-qtquickcontrols2
%endif
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  cmake
BuildRequires:  pkgconfig(libarchive)
BuildRequires:  pkgconfig(libcurl)
%if 0%{?suse_version}
BuildRequires:  pkgconfig
BuildRequires:  util-linux-systemd
BuildRequires:  pkgconfig(openssl)
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5QuickControls2)
%endif
%if 0%{?fedora_version}
BuildRequires:  pkgconf-pkg-config
BuildRequires:  util-linux
BuildRequires:  openssl-devel
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5QuickControls2)
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%define debug_package %{nil}

%description
Raspberry Pi Imager is the quick and easy way to install Raspberry Pi OS and
other operating systems to a microSD card, ready to use with your Raspberry Pi.

%prep
%setup -q -n %{name}-%{version}

%build
pushd src
%cmake . -DENABLE_CHECK_VERSION=0 -DENABLE_TELEMETRY=0
%cmake_build %{?_smp_mflags}
popd

%install
pushd src
%cmake_install
popd

%files
%defattr(-,root,root)
%{_bindir}/rpi-imager
%{_datadir}/icons/hicolor/128x128/apps/rpi-imager.png
%{_datadir}/applications/rpi-imager.desktop
%{_datadir}/metainfo/rpi-imager.metainfo.xml

%changelog
openSUSE Build Service is sponsored by