File cmst.spec of Package cmst

Name:           cmst
Version:        2023.03.14+git0_a4c0e8a
Release:        0
Summary:        Connman GUI
License:        MIT
Group:          System/GUI/Other
Url:            https://github.com/andrew-bibb/cmst
Source0:        %{name}-%{version}.tar.gz
Source1:        connman-group.conf
%if 0%{?suse_version}
BuildRequires: qt6-base-common-devel
BuildRequires: qt6-tools-linguist
BuildRequires: qt6-dbus-devel qt6-core-devel qt6-gui-devel
BuildRequires: qt6-network-devel qt6-widgets-devel
%endif
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
BuildRequires: qt6-qtbase-devel
BuildRequires: qt6-linguist
%global debug_package %{nil}
%endif

%description
A GUI for connman.

%prep
%setup -q

%build
qmake6
make %{?_smp_mflags}

%install
make INSTALL_ROOT=%{buildroot} install
install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/dbus-1/system.d/connman-group.conf
sed -i 's/networkd/systemd-network/' %{buildroot}%{_sysconfdir}/dbus-1/system.d/org.cmst.roothelper.conf

%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
%package debuginfo
Summary: Debug information for package %{name}
Group: Development/Debug

%description debuginfo
This package provides debug information for package cmst.
Debug information is useful when developing applications that use this
package or when debugging this package.

%files debuginfo
%defattr(-,root,root,-)
/usr/lib/debug/*
%endif

%files
%defattr(-, root, root)
%{_sysconfdir}/dbus-1/system.d/org.cmst.roothelper.conf
%{_sysconfdir}/dbus-1/system.d/connman-group.conf
%{_bindir}/cmst
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/scalable/apps/cmst.svg
%{_datadir}/applications/*.desktop
%{_datadir}/cmst/autostart/*.desktop
%{_datadir}/dbus-1/system-services/*.service
%{_datadir}/licenses/cmst/LICENSE
/usr/lib/cmst/cmstroothelper
%{_datadir}/man/man1/cmst.1.gz
%{_datadir}/metainfo/org.cmst.cmst.appdata.xml
%dir /usr/lib/cmst
%dir %{_datadir}/cmst
%dir %{_datadir}/licenses/cmst
%dir %{_datadir}/cmst/autostart
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/*/apps
%dir %{_datadir}/icons/hicolor/*
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
openSUSE Build Service is sponsored by