File grommunio-cui.spec of Package grommunio-cui

#
# spec file for package grommunio-cui
#
# 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/
#


%define _libexecdir %_prefix/libexec

Name:           grommunio-cui
Version:        1.0.238.094875f
Release:        0
Summary:        Console welcome screen for the grommunio Appliance
License:        AGPL-3.0-or-later
URL:            https://grommunio.com/
Source:         %name-%version.tar.xz
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildArch:      noarch
Requires:       /usr/bin/setlogcons
Requires:       python3-PyYAML >= 5.3.1
Requires:       python3-configobj
Requires:       python3-netifaces >= 0.10.6
Requires:       python3-pamela >= 1.0.0
Requires:       python3-psutil >= 5.4.8
Requires:       python3-systemd >= 234
Requires:       python3-urwid >= 2.0.1
Requires:       yast2-country
Requires:       yast2-network

%description
grommunio CUI (console user interface) is a textgraphical interface for
managing the basic grommunio Appliance configuration.
It is localized, with selectable keyboard layouts and languages.

%prep
%autosetup -p1

%build

%install
%make_install
%find_lang cui

%global services grommunio-cui@.service setlogcons.service

%pre
%if 0%{?service_add_pre:1}
%service_add_pre %services
%endif

%post
%if 0%{?service_add_post:1}
%service_add_post %services
%else
%systemd_post %services
%endif

%preun
%if 0%{?service_del_preun:1}
%service_del_preun %services
%else
%systemd_preun %services
%endif

%postun
%if 0%{?service_del_postun:1}
%service_del_postun %services
%else
%systemd_postun_with_restart %services
%endif

%files -f cui.lang
%if 0%{?suse_version} >= 1500 && 0%{?suse_version} < 1550
%dir %_libexecdir
%endif
%_libexecdir/*
%_sbindir/grom*
%_unitdir/*
%license LICENSE.txt

%changelog
openSUSE Build Service is sponsored by