File arctica-greeter.spec of Package arctica-greeter

#
# spec file for package arctica-greeter
#
# Copyright (c) 2022-2025 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 _name           lightdm-arctica-greeter
Name:                   arctica-greeter
Version:                0.99.9.2
Release:                0
Summary:                LightDM Arctica Greeter
License:                CC-BY-SA-1.0 AND CC-BY-SA-3.0 AND GPL-3.0-only AND GPL-2.0-or-later
Group:                  System/X11/Displaymanagers
URL:                    https://github.com/ArcticaProject/arctica-greeter
Source0:                https://releases.arctica-project.org/source/%{name}/%{name}-%{version}.tar.gz
Source1:                %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE arctica-greeter-disable-remote-logon.patch ionic@ionic.de -- Disable some parts of remote logon due to unpackaged software.
Patch0:                 %{name}-disable-remote-logon.patch
# PATCH-FIX-OPENSUSE arctica-greeter-do-not-force-arctica-greeter.patch ionic@ionic.de -- Disable forced loading of Arctica Greeter, unbreaks the update-alternatives system.
Patch1:                 %{name}-do-not-force-arctica-greeter.patch
# Some documentation for people writing branding packages, shipped in the branding-upstream package.
Source2:                README.GSettings-overrides

# Needs packaging! Required for the remote logon feature.
#BuildRequires:         pam_freerdp2-devel
#BuildRequires:         pam_x2go-devel

BuildRequires:          intltool
# For directory owning.
BuildRequires:          lightdm
#!BuildIgnore:          lightdm-slick-greeter
BuildRequires:          mate-common
BuildRequires:          systemd-rpm-macros
BuildRequires:          vala >= 0.20
BuildRequires:          pkgconfig
BuildRequires:          pkgconfig(ayatana-indicator3-0.4) >= 0.6.0
BuildRequires:          pkgconfig(cairo-ft)
BuildRequires:          pkgconfig(freetype2)
BuildRequires:          pkgconfig(gdk-x11-3.0)
BuildRequires:          pkgconfig(gio-2.0)
BuildRequires:          pkgconfig(gtk+-3.0)
BuildRequires:          pkgconfig(libayatana-ido3-0.4) >= 0.4.0
BuildRequires:          pkgconfig(libcanberra)
BuildRequires:          pkgconfig(liblightdm-gobject-1) >= 1.12.0
BuildRequires:          pkgconfig(mate-settings-daemon)
BuildRequires:          pkgconfig(pixman-1)
BuildRequires:          pkgconfig(x11)
BuildRequires:          pkgconfig(xext)
BuildRequires:          polkit

# For tests, which we don't currently run.
#BuildRequires:         xvfb-run
#BuildRequires:         valgrind
#BuildRequires:         at-spi2-core
#BuildRequires:         dbus-1-x11

%description
A greeter shell for the LightDM login manager.

Arctica Greeter can be used as the local display manager as well
as a thin client login manager.

Arctica Greeter has been forked from Ubuntu's Unity Greeter with
focus on keeping remote logon support a maintained feature and
provide a user interface based on Ayatana Indicators.

Arctica Greeter can be extended with various features:

  - remote logon support against RDP, Arctica and X2Go Servers
  - guest session support
  - various themes available / providable

%package -n %{_name}
Summary:                LightDM Arctica Greeter
Requires:               %{_name}-branding = %{version}
Requires:               lightdm
Requires:               marco
Requires:               mate-settings-daemon
Requires:               NetworkManager
# Screen reading support is currently hardcoded to this program.
Requires:               orca
Requires:               python3
Requires:               %{python_module setproctitle}
Requires:               xkbutils
Requires(post):         update-alternatives
Requires(postun):       update-alternatives
Recommends:             %{_name}-lang
Recommends:             ayatana-indicator-a11y
Recommends:             ayatana-indicator-application
Recommends:             ayatana-indicator-datetime
Recommends:             ayatana-indicator-display
Recommends:             ayatana-indicator-keyboard
Recommends:             ayatana-indicator-power
Recommends:             ayatana-indicator-session
Recommends:             ayatana-indicator-sound
Recommends:             NetworkManager-applet
Recommends:             numlockx
Recommends:             onboard
Recommends:             xinput
Provides:               lightdm-greeter
%glib2_gsettings_schema_requires
%systemd_requires

%description -n %{_name}
A greeter shell for the LightDM login manager.

Arctica Greeter can be used as the local display manager as well
as a thin client login manager.

Arctica Greeter has been forked from Ubuntu's Unity Greeter with
focus on keeping remote logon support a maintained feature and
provide a user interface based on Ayatana Indicators.

Arctica Greeter can be extended with various features:

  - remote logon support against RDP, Arctica and X2Go Servers
  - guest session support
  - various themes available / providable

%lang_package -n %{_name}

%package -n %{_name}-branding-upstream
Summary:                Upstream branding of %{_name}
Requires:               %{_name} = %{version}
Requires:               noto-sans-fonts
Requires:               gtk3-metatheme-numix
Requires:               numix-icon-theme
Supplements:            (%{_name} and branding-upstream)
Conflicts:              %{_name}-branding = %{version}
Provides:               %{_name}-branding = %{version}
BuildArch:              noarch
#BRAND: A /usr/share/glib-2.0/schemas/$NAME.gschema.override file can
#BRAND: be used to override the default value for GSettings keys. See
#BRAND: README.GSettings-overrides for more details. The branding
#BRAND: package should then have proper Requires for features changed
#BRAND: with such an override file.

%description -n %{_name}-branding-upstream
This package provides the upstream look and feel for
lightdm-arctica-greeter.

%package -n %{_name}-guest-session
Summary:                Guest session support for %{_name}
Requires:               shadow
Requires:               %{_name} = %{version}
Suggests:               openbox
BuildArch:              noarch

%description -n %{_name}-guest-session
A greeter shell for the LightDM login manager.

Arctica Greeter can be used as the local display manager as well
as a thin client login manager.

This package adds guest account support to the Arctica Greeter
login manager.

%package -n %{_name}-remote-logon
Summary:                Remote logon support for %{_name}
Requires:               %{_name}-guest-session = %{version}
Requires:               remote-logon-service
Recommends:             lightdm-remote-session-freerdp2
Recommends:             lightdm-remote-session-x2go
BuildArch:              noarch

%description -n %{_name}-remote-logon
A greeter shell for the LightDM login manager.

Arctica Greeter can be used as the local display manager as well
as a thin client login manager.

This package adds remote logon support to Arctica Greeter. Remote
sessions supported by Arctica Greeter are:

  - Arctica Remote Desktop Sessions
  - X2Go Desktop Sessions
  - Windows RDP sessions (FreeRDP)
  - Citrix Remote Desktop Sessions

%prep
%autosetup -p1
cp -a %{SOURCE2} .
# Force regeneration of desktop.in file.
rm -f 'data/arctica-greeter.desktop.in'

%build
test -e README.md && ! test -e README && cp -a README.md README || true
NOCONFIGURE=1 ./autogen.sh
%configure --disable-gtk4
make %{?_smp_mflags} V=1

%install
%make_install

# on (open)SUSE, LightDM has its config /etc/xdg/lightdm, not /etc/lightdm
mkdir -p %{buildroot}%{_sysconfdir}/xdg/ 
mv %{buildroot}%{_sysconfdir}/lightdm %{buildroot}%{_sysconfdir}/xdg/lightdm

# on (open)SUSE, .pkla files need to be placed into /var/lib/polkit/...
mv %{buildroot}%{_localstatedir}/lib/polkit-1 %{buildroot}%{_localstatedir}/lib/polkit

%find_lang %{name}

mkdir -p %{buildroot}%{_sysconfdir}/alternatives/
touch %{buildroot}%{_sysconfdir}/alternatives/lightdm-default-greeter.desktop
ln -s %{_sysconfdir}/alternatives/lightdm-default-greeter.desktop \
  %{buildroot}%{_datadir}/xgreeters/lightdm-default-greeter.desktop

%post -n %{_name}
update-alternatives --install \
  %{_datadir}/xgreeters/lightdm-default-greeter.desktop \
  lightdm-default-greeter.desktop \
  %{_datadir}/xgreeters/%{name}.desktop \
  10

%postun -n %{_name}
if [ '0' = "${1}" ]; then
    update-alternatives --remove \
      lightdm-default-greeter.desktop \
      %{_datadir}/xgreeters/%{name}.desktop
fi

%files -n %{_name}
%license COPYING
%doc AUTHORS NEWS NEWS.Canonical README
%config %{_sysconfdir}/xdg/lightdm/lightdm.conf.d/*-%{name}.conf
%ghost %attr(0644,root,root) %{_sysconfdir}/alternatives/lightdm-default-greeter.desktop
%{_datadir}/%{name}/
%exclude %{_datadir}/%{name}/guest-session
%{_datadir}/glib-2.0/schemas/*%{name}.gschema.xml
%{_datadir}/lightdm/lightdm.conf.d/*-%{name}.conf
%{_datadir}/sounds/%{name}
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/backgrounds/%{name}.png
%{_datadir}/polkit-1/rules.d/50-org.Arctica-Project.arctica-greeter.rules
%dir %{_datadir}/xgreeters/
%{_datadir}/xgreeters/%{name}.desktop
%{_datadir}/xgreeters/lightdm-default-greeter.desktop
%dir %{_libexecdir}/%{name}/
%{_libexecdir}/%{name}/%{_name}-session
%{_libexecdir}/%{name}/%{name}-check-hidpi
%{_libexecdir}/%{name}/%{name}-enable-tap-to-click
%{_libexecdir}/%{name}/%{name}-set-keyboard-layout
%{_libexecdir}/%{name}/%{name}-magnifier
%dir %{_localstatedir}/lib/polkit/
%dir %{_localstatedir}/lib/polkit/localauthority/
%dir %{_localstatedir}/lib/polkit/localauthority/10-vendor.d/
%{_localstatedir}/lib/polkit/localauthority/10-vendor.d/%{name}.pkla
%{_mandir}/man1/%{name}.1%{?ext_man}
%{_mandir}/man1/%{name}-check-hidpi.1.gz
%{_mandir}/man1/%{name}-enable-tap-to-click.1.gz
%{_mandir}/man1/%{name}-magnifier.1.gz
%{_mandir}/man1/%{name}-set-keyboard-layout.1.gz
%{_bindir}/%{name}

%files -n %{_name}-lang -f %{name}.lang

%files -n %{_name}-branding-upstream
%doc README.GSettings-overrides

%files -n %{_name}-guest-session
%config %{_sysconfdir}/xdg/lightdm/lightdm.conf.d/*-%{name}-guest-session.conf
%{_datadir}/%{name}/guest-session
%{_datadir}/lightdm/lightdm.conf.d/*-%{name}-guest-wrapper.conf
%{_libexecdir}/%{name}/%{name}-guest-session-auto.sh
%{_libexecdir}/%{name}/%{name}-guest-session-setup.sh
%{_mandir}/man8/%{name}-guest-account-script.8%{?ext_man}
%{_sbindir}/%{name}-guest-account-script

%files -n %{_name}-remote-logon
%config %{_sysconfdir}/xdg/lightdm/lightdm.conf.d/*-%{name}-remote-logon.conf

%changelog
openSUSE Build Service is sponsored by