File qgroundcontrol.spec of Package qgroundcontrol

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

# See also

Name:           qgroundcontrol
Version:        4.1.2
Release:        0
Summary:        An operator control unit / ground control software for micro air vehicles
License:        GPL-3.0-only
Source0:        qgroundcontrol-%{version}.tar.xz
# ModemManager has the broken design to grab any serial port first
# as background daemon. this breaks any other app which needs to access the device
# on boot up (for firmware update here)
Conflicts:      ModemManager
%if 0%{?fedora_version}
BuildRequires:  python2
BuildRequires:  systemd-devel
BuildRequires:  libqt5-qtlocation-private-headers-devel

BuildRequires:  cmake
BuildRequires:  pkgconfig(Qt5Charts)
BuildRequires:  pkgconfig(Qt5Core) >= 5.11
BuildRequires:  pkgconfig(Qt5MultimediaWidgets)
BuildRequires:  pkgconfig(Qt5Bluetooth)
BuildRequires:  pkgconfig(Qt5OpenGL)
BuildRequires:  pkgconfig(Qt5Positioning)
BuildRequires:  pkgconfig(Qt5QuickControls2)
BuildRequires:  pkgconfig(Qt5ScriptTools)
BuildRequires:  pkgconfig(Qt5SerialPort)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5TextToSpeech)
BuildRequires:  pkgconfig(Qt5UiTools)
BuildRequires:  pkgconfig(Qt5WaylandClient)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
%if 0%{?suse_version} >= 1500
BuildRequires:  pkgconfig(Qt5Qwt6)

BuildRequires:  Mesa-libGLESv3-devel
BuildRequires:  SDL2-devel
BuildRequires:  fdupes
BuildRequires:  gstreamer-devel
BuildRequires:  gstreamer-plugins-base-devel
BuildRequires:  libicu-devel
BuildRequires:  libsndfile-devel
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig(libudev)

#qml deps
Requires:       libqt5-qtcharts-imports
Requires:       libqt5-qtgraphicaleffects
Requires:       libqt5-qtquickcontrols2

QGroundControl is an operator control unit / ground control software
for micro air vehicles. It allows to visualize and control a micro
air vehicle during development and operation, both indoors and
outdoors. With a flexible software architecture, it supports multiple
MAV types/autopilot projects.

%setup -q
mkdir build

cd build
# AIRMAP SDK needs to get packaged first
#set -i -e '/Airmap/d' ../src/CMakeLists.txt
#qmake-qt5 DISABLE_AIRMAP=1 ../
cmake ..
make %{?_smp_mflags}

cd build
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_datadir}/%{name}/
#cp -R release/flightgear %{buildroot}/%{_datadir}/%{name}/
install -p -m 755 QGroundControl %{buildroot}/%{_bindir}/
mkdir -p %{buildroot}/usr/share/{applications,pixmaps}
install -p -m 0644 ../deploy/qgroundcontrol.desktop %{buildroot}/usr/share/applications/
install -p -m 0644 ../doc/qgroundcontrol.png %{buildroot}/usr/share/pixmaps/
sed -i -e 's/^Categories=.*/Categories=System;HardwareSettings;/' %{buildroot}/usr/share/applications/qgroundcontrol.desktop
%fdupes %{buildroot}%{_prefix}

%attr(0755,root,root) %{_bindir}/QGroundControl

openSUSE Build Service is sponsored by