summaryrefslogtreecommitdiff
path: root/sddm.spec
blob: 9f930ed9cd3b9007d54ce5b05417a523a876dadc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
%undefine __cmake_in_source_build

# Control wayland by default
#bcond_with wayland_default

Name:           sddm
Version:        0.19.0
Release:        1
License:        GPLv2+
Summary:        QML based X11 desktop manager

Url:            https://github.com/sddm/sddm
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

Patch16:        0016-Fix-sessions-being-started-as-the-wrong-type-on-auto.patch
Patch18:        0018-wayland-session-Ensure-SHELL-remains-correctly-set.patch
Patch051:       0001-Remove-suffix-for-Wayland-session.patch
Patch052:       0001-Redesign-Xauth-handling.patch
Patch053:       0001-Retry-starting-the-display-server.patch
Patch054:       3c92e9206dc2e17fa5dc13f37be2926e9131ce94.patch
Patch055:       308fd0df2583b02251f0d80c397ccbf9fa7a9e04.patch

# sddm.service: +EnvironmentFile=-/etc/sysconfig/sddm
Patch103:       sddm-0.18.0-environment_file.patch

# Disable wayland sessions when /dev/dri doesn't exist
Patch104:       sddm-0.19.0-allow-hiding-wayland-sessions.patch

# Fix race with logind restart, and start seat0 if !CanGraphical on timer
Patch105:       0001-Delay-for-logind-and-fallback-to-seat0.patch

# Shamelessly stolen from fedora
Source11:       sddm.pam
Source12:       sddm-autologin.pam
Source13:       tmpfiles-sddm.conf
# sample sddm.conf generated with sddm --example-config
Source14:       sddm.conf
# README.scripts
Source15:       README.scripts
# sysconfig snippet
Source16:       sddm.sysconfig
# systemd sysusers config
Source18:       sddm-systemd-sysusers.conf

Provides:       service(graphical-login) = sddm

BuildRequires:  cmake >= 2.8.8
BuildRequires:  extra-cmake-modules
BuildRequires:  libxcb-devel
BuildRequires:  pam-devel
BuildRequires:  pkgconfig(libsystemd)
BuildRequires:  pkgconfig(systemd)
# Check which package contains /usr/bin/rst2man
BuildRequires:  python3-docutils
BuildRequires:  qt5-qtbase-devel >= 5.6
BuildRequires:  qt5-qtdeclarative-devel >= 5.6
BuildRequires:  qt5-qttools-devel >= 5.6
BuildRequires:  shadow-utils
BuildRequires:  systemd

Obsoletes:      kde-settings-sddm < 20-5

Requires:       systemd
Requires:       xorg-x11-xinit
Requires:       xorg-x11-server-Xorg

Suggests:       qt5-qtvirtualkeyboard%{?_isa}

%{?systemd_requires}

Requires(pre):  shadow-utils

%description
SDDM is a modern display manager for X11 aiming to be fast, simple and
beautiful. It uses modern technologies like QtQuick, which in turn gives the
designer the ability to create smooth, animated user interfaces.

%package themes
Summary:        SDDM Themes
Obsoletes:      sddm < 0.2.0-0.12
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch

%description themes
A collection of sddm themes, including: elarun, maldives, maya


%prep
%autosetup -p1

%build
%cmake \
  -DBUILD_MAN_PAGES:BOOL=ON \
  -DCMAKE_BUILD_TYPE:STRING="Release" \
  -DENABLE_JOURNALD:BOOL=ON \
  -DSESSION_COMMAND:PATH=/etc/X11/xinit/Xsession \
  -DWAYLAND_SESSION_COMMAND:PATH=/etc/sddm/wayland-session

%make_build


%install
make install/fast DESTDIR=%{buildroot} 

mkdir -p %{buildroot}%{_sysconfdir}/sddm.conf.d
install -Dpm 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/pam.d/sddm
install -Dpm 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/pam.d/sddm-autologin
install -Dpm 644 %{SOURCE13} %{buildroot}%{_tmpfilesdir}/sddm.conf
install -Dpm 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/sddm.conf
install -Dpm 644 %{SOURCE15} %{buildroot}%{_datadir}/sddm/scripts/README.scripts
install -Dpm 644 %{SOURCE16} %{buildroot}%{_sysconfdir}/sysconfig/sddm
install -Dpm 644 %{SOURCE18} %{buildroot}%{_sysusersdir}/sddm.conf
mkdir -p %{buildroot}/run/sddm
mkdir -p %{buildroot}%{_localstatedir}/lib/sddm
mkdir -p %{buildroot}%{_sysconfdir}/sddm/
cp -a %{buildroot}%{_datadir}/sddm/scripts/* \
      %{buildroot}%{_sysconfdir}/sddm/
rm -fv %{buildroot}%{_sysconfdir}/sddm/Xsession

%pre
mkdir %{_sysusersdir}/sddm.conf.d
echo 'u sddm - "Simple Desktop Display Manager" /var/lib/sddm' > %{_sysusersdir}/sddm.conf.d/sddm-systemd-sysusers.conf

%post
%systemd_post sddm.service
# handle incompatible configuration changes
(grep \
   -e '^\[XDisplay\]$' \
   -e '^\[WaylandDisplay\]$' \
   %{_sysconfdir}/sddm.conf > /dev/null && \
 sed -i.rpmsave \
   -e 's|^\[XDisplay\]$|\[X11\]|' \
   -e 's|^\[WaylandDisplay\]$|\[Wayland\]|' \
   %{_sysconfdir}/sddm.conf
) ||:

%preun
%systemd_preun sddm.service

%postun
%systemd_postun sddm.service

%files
%license LICENSE
%doc README.md CONTRIBUTORS
%dir %{_sysconfdir}/sddm/
%dir %{_sysconfdir}/sddm.conf.d
%config(noreplace)   %{_sysconfdir}/sddm/*
%config(noreplace)   %{_sysconfdir}/sddm.conf
%config(noreplace)   %{_sysconfdir}/pam.d/sddm
%config(noreplace)   %{_sysconfdir}/pam.d/sddm-autologin
%config(noreplace)   %{_sysconfdir}/pam.d/sddm-greeter
%config(noreplace) %{_sysconfdir}/sysconfig/sddm
# THIS IS NOT A CONFIG FILE, but a script that is run by sddm.service
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.DisplayManager.conf
%{_bindir}/sddm
%{_bindir}/sddm-greeter
%{_libexecdir}/sddm-helper
%{_tmpfilesdir}/sddm.conf
%{_sysusersdir}/sddm.conf
%attr(0711, root, sddm) %dir /run/sddm
%attr(1770, sddm, sddm) %dir %{_localstatedir}/lib/sddm
%{_unitdir}/sddm.service
%{_qt5_archdatadir}/qml/SddmComponents/
%dir %{_datadir}/sddm
%{_datadir}/sddm/faces/
%{_datadir}/sddm/flags/
%{_datadir}/sddm/scripts/
%dir %{_datadir}/sddm/themes/
%{_datadir}/sddm/translations/
%{_mandir}/man1/sddm.1*
%{_mandir}/man1/sddm-greeter.1*
%{_mandir}/man5/sddm.conf.5*
%{_mandir}/man5/sddm-state.conf.5*

%files themes
%{_datadir}/sddm/themes/elarun/
%{_datadir}/sddm/themes/maldives/
%{_datadir}/sddm/themes/maya/


%changelog
* Fri Jul 22 2022 misaka00251 <misaka00251@misakanet.cn> - 0.19.0-1
- Init package