File cluster-dashboard.spec of Package cluster-dashboard

#
# spec file for package cluster-dashboard
#
# Copyright (c) 2023 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/
#


Name:           cluster-dashboard
Version:        1.0.0
Release:        0
Summary:        Instrument Cluster Dashboard application
License:        Apache-2.0 AND BSD-3-Clause
URL:            https://gitlab.suse.de/automotive-group/agl-cluster-demo-dashboard
Source:         https://gitlab.suse.de/automotive-group/agl-cluster-demo-dashboard/-/archive/master/agl-cluster-demo-dashboard-master.tar.gz
Source1:        %{name}.service
Source2:        77-cluster-dashboard.preset
Source3:        cluster-dashboard.conf
Source4:        AGL.conf
BuildRequires:  cmake
BuildRequires:  glib2-devel
BuildRequires:  libQt5Gui-private-headers-devel
BuildRequires:  libQt5QuickControls2-devel
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  libqt5-qtwayland-devel
BuildRequires:  libqtappfw0
BuildRequires:  ninja
BuildRequires:  pkgconfig
BuildRequires:  qtappfw-devel
BuildRequires:  systemd-devel
BuildRequires:  wayland-devel
Requires:       agl-compositor
Requires:       google-roboto-fonts
Requires:       libQt5Svg5
Requires:       libqt5-qtquickcontrols
Requires:       libqt5-qtquickcontrols2
Requires:       libqt5-qtwayland
Requires:       polkit
ExclusiveArch:  x86_64 aarch64

%description

%prep
%autosetup -n agl-cluster-demo-dashboard-master -p1

%build
%cmake
%cmake_build

%install
%cmake_install
install -Dm0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -Dm0644 %{SOURCE2} %{buildroot}/%{_presetdir}/77-cluster-dashboard.preset
install -Dm0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/xdg/AGL/cluster-dashboard.conf
install -Dm0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/xdg/AGL.conf

%pre
%service_add_pre %{name}.service %{name}.socket

%post
%service_add_post %{name}.service %{name}.socket

%preun
%service_del_preun %{name}.service %{name}.socket

%postun
%service_del_postun %{name}.service %{name}.socket

%files
%license LICENSE
%{_bindir}/%{name}
%{_unitdir}/%{name}.service
%{_presetdir}/77-cluster-dashboard.preset
%dir %{_sysconfdir}/xdg/AGL/
%{_sysconfdir}/xdg/AGL.conf
%{_sysconfdir}/xdg/AGL/cluster-dashboard.conf

%changelog
openSUSE Build Service is sponsored by