]>
Commit | Line | Data |
---|---|---|
8afa832f ER |
1 | # Conditional build: |
2 | %bcond_with tests # build without tests (tests fail mostly) | |
f4c63304 | 3 | %bcond_without qt5 # build without Qt5 |
8afa832f | 4 | |
c5b54d7b ZU |
5 | Summary: A lightweight display manager |
6 | Summary(hu.UTF-8): Egy könnyűsúlyú bejelentkezéskezelő | |
7 | Name: lightdm | |
33777998 | 8 | # Odd versions are development, use only Even versions here (1.x = x odd/even) |
7b9123b4 | 9 | Version: 1.32.0 |
15badd0d | 10 | Release: 1 |
eff0aaee ER |
11 | # library/bindings are LGPLv2 or LGPLv3, the rest GPLv3+ |
12 | License: (LGPLv2 or LGPLv3) and GPLv3+ | |
c5b54d7b | 13 | Group: X11/Applications |
ea4fcebf | 14 | Source0: https://github.com/CanonicalLtd/lightdm/releases/download/%{version}/%{name}-%{version}.tar.xz |
7b9123b4 | 15 | # Source0-md5: e62a5da6c35f612e4d9575eda5c8d467 |
6330239a | 16 | Source1: %{name}.pamd |
9affbe56 ER |
17 | Source2: %{name}-autologin.pamd |
18 | Source3: %{name}-greeter.pamd | |
aeb930bc | 19 | Source4: %{name}.init |
8afa832f | 20 | Source5: %{name}-tmpfiles.conf |
4f2b8153 | 21 | Patch0: config.patch |
5c2715b7 | 22 | Patch1: %{name}-nodaemon_option.patch |
65a202a6 | 23 | URL: http://www.freedesktop.org/wiki/Software/LightDM |
a0bff196 | 24 | BuildRequires: autoconf |
3d3d7bd6 | 25 | BuildRequires: automake >= 1:1.11 |
a0bff196 | 26 | BuildRequires: docbook-dtd412-xml |
f2d5e0af | 27 | BuildRequires: gettext-tools |
0e15dcbc | 28 | BuildRequires: glib2-devel >= 1:2.30 |
a0bff196 | 29 | BuildRequires: gnome-common |
c5b54d7b | 30 | BuildRequires: gnome-doc-utils |
3d3d7bd6 | 31 | BuildRequires: gobject-introspection-devel >= 0.9.5 |
a0bff196 | 32 | BuildRequires: gtk-doc |
3d3d7bd6 | 33 | BuildRequires: intltool >= 0.35.0 |
f320953a | 34 | BuildRequires: libgcrypt-devel |
a0bff196 | 35 | BuildRequires: libtool |
3d3d7bd6 | 36 | BuildRequires: libxcb-devel |
768f7b75 ZU |
37 | BuildRequires: libxklavier-devel |
38 | BuildRequires: pam-devel | |
c5b54d7b ZU |
39 | BuildRequires: perl-XML-Parser |
40 | BuildRequires: perl-base | |
a0bff196 | 41 | BuildRequires: pkgconfig |
530571ee | 42 | BuildRequires: rpm-build >= 4.6 |
7b654e98 | 43 | BuildRequires: rpmbuild(macros) >= 1.690 |
e8d8d6ad | 44 | BuildRequires: tar >= 1:1.22 |
6330239a | 45 | BuildRequires: vala |
3d3d7bd6 JP |
46 | BuildRequires: xorg-lib-libX11-devel |
47 | BuildRequires: xorg-lib-libXdmcp-devel | |
e8d8d6ad ER |
48 | BuildRequires: xz |
49 | BuildRequires: yelp-tools | |
f4c63304 ER |
50 | %if %{with qt5} |
51 | BuildRequires: Qt5Core-devel | |
52 | BuildRequires: Qt5DBus-devel | |
53 | BuildRequires: Qt5Gui-devel | |
54 | BuildRequires: qt5-build | |
55 | %endif | |
26ddca36 | 56 | Requires: /usr/bin/X |
e8d8d6ad | 57 | Requires: dbus-x11 |
d1bb4d34 | 58 | Requires: lightdm-greeter |
9e848167 | 59 | Requires: xinitrc-ng >= 1.1-2 |
e476a337 | 60 | Provides: XDM |
d1bb4d34 JP |
61 | Provides: group(xdm) |
62 | Provides: user(xdm) | |
c5b54d7b ZU |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
64 | ||
b30834b2 JP |
65 | %define bashdir %{_sysconfdir}/bash_completion.d |
66 | ||
c5b54d7b ZU |
67 | %description |
68 | An X display manager that: | |
69 | - Has a lightweight codebase | |
70 | - Is standards compliant (PAM, ConsoleKit, etc) | |
71 | - Has a well defined interface between the server and user interface | |
72 | - Fully themeable (easiest with the webkit interface) | |
73 | - Cross-desktop (greeters can be written in any toolkit) | |
74 | ||
75 | %description -l hu.UTF-8 | |
76 | Egy X bejelentkezéskezelő, amely: | |
77 | - pehelysúlyú kóddal rendelkezik | |
78 | - követi a standardokat (PAM, ConsoleKit, stb.) | |
79 | - jól-definiált felület a szerver és a felhasználói felület között | |
80 | - teljesen témázható (a legkönnyebb a webkit felülettel) | |
81 | - desktop-független (üdvözlők bármilyen eszközkészlettel írhatók) | |
82 | ||
8b528774 ER |
83 | %package libs-gobject |
84 | Summary: LightDM GObject client library | |
9bc4da5d | 85 | Group: Libraries |
8b528774 | 86 | Obsoletes: lightdm-libs < 1.7.0-0.6 |
9bc4da5d | 87 | |
8b528774 ER |
88 | %description libs-gobject |
89 | This package contains a GObject based library for LightDM clients to | |
90 | use to interface with LightDM. | |
9bc4da5d | 91 | |
8b528774 ER |
92 | %package libs-gobject-devel |
93 | Summary: Development files for %{name}-gobject | |
c5b54d7b | 94 | Group: Development/Libraries |
8b528774 ER |
95 | Group: Libraries |
96 | Requires: %{name}-libs-gobject = %{version}-%{release} | |
97 | ||
98 | %description libs-gobject-devel | |
99 | This package contains development files for a GObject based library | |
100 | for LightDM clients to use to interface with LightDM. | |
101 | ||
3d3d7bd6 JP |
102 | %package libs-qt5 |
103 | Summary: LightDM Qt5 client library | |
104 | Group: Libraries | |
7b9123b4 | 105 | Obsoletes: lightdm-libs-qt4 < 1.32.0 |
3d3d7bd6 JP |
106 | |
107 | %description libs-qt5 | |
108 | This package contains a Qt5 based library for LightDM clients to use | |
109 | to interface with LightDM. | |
110 | ||
111 | %package libs-qt5-devel | |
112 | Summary: Development files for %{name}-qt5 | |
113 | Group: Development/Libraries | |
114 | Requires: %{name}-libs-qt5 = %{version}-%{release} | |
7b9123b4 | 115 | Obsoletes: lightdm-libs-qt4-devel < 1.32.0 |
3d3d7bd6 JP |
116 | |
117 | %description libs-qt5-devel | |
118 | This package contains development files for a Qt5 based library for | |
8b528774 | 119 | LightDM clients to use to interface with LightDM. |
c5b54d7b | 120 | |
c5b54d7b ZU |
121 | %package apidocs |
122 | Summary: lightdm API documentation | |
123 | Group: Documentation | |
77a840c7 | 124 | BuildArch: noarch |
c5b54d7b ZU |
125 | |
126 | %description apidocs | |
127 | lightdm API documentation. | |
128 | ||
aeb930bc ER |
129 | %package init |
130 | Summary: Init script for Lightdm | |
131 | Summary(pl.UTF-8): Skrypt init dla Lightdm-a | |
132 | Group: X11/Applications | |
133 | Requires(post,preun): /sbin/chkconfig | |
134 | Requires(post,postun): systemd-units >= 38 | |
135 | Requires: %{name} = %{version}-%{release} | |
136 | Requires: rc-scripts >= 0.4.3.0 | |
137 | Requires: systemd-units >= 38 | |
138 | Obsoletes: lightdm-upstart < 1.7.12-6 | |
008e6bad | 139 | |
aeb930bc ER |
140 | %description init |
141 | Init script for Lightdm. | |
008e6bad | 142 | |
aeb930bc ER |
143 | %description init -l pl.UTF-8 |
144 | Skrypt init dla Lightdm-a. | |
008e6bad | 145 | |
b30834b2 JP |
146 | %package -n bash-completion-lightdm |
147 | Summary: Bash completion for LightDM | |
148 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla LightDM | |
149 | Group: Applications/Shells | |
150 | Requires: %{name} = %{version}-%{release} | |
151 | Requires: bash-completion | |
152 | %if "%{_rpmversion}" >= "5" | |
153 | BuildArch: noarch | |
154 | %endif | |
155 | ||
156 | %description -n bash-completion-lightdm | |
157 | Bash completion for LightDM. | |
158 | ||
159 | %description -n bash-completion-lightdm -l pl.UTF-8 | |
160 | Bashowe uzupełnianie parametrów dla LightDM. | |
161 | ||
c5b54d7b ZU |
162 | %prep |
163 | %setup -q | |
4f2b8153 | 164 | %patch0 -p1 |
5c2715b7 | 165 | %patch1 -p1 |
c5b54d7b ZU |
166 | |
167 | %build | |
768f7b75 | 168 | %{__libtoolize} |
a84ee4bd | 169 | %{__gtkdocize} |
768f7b75 ZU |
170 | %{__aclocal} |
171 | %{__autoconf} | |
172 | %{__autoheader} | |
173 | %{__automake} | |
174 | %configure \ | |
d1bb4d34 | 175 | --disable-silent-rules \ |
8b528774 | 176 | --disable-static \ |
8afa832f | 177 | %{__enable tests} \ |
f4c63304 | 178 | %{?with_qt5:--enable-liblightdm-qt5} \ |
48783655 | 179 | --with-html-dir=%{_gtkdocdir} \ |
6330239a | 180 | --enable-gtk-doc \ |
862615aa | 181 | --with-greeter-session=lightdm-gtk-greeter \ |
d1bb4d34 | 182 | --with-greeter-user=xdm |
c5b54d7b | 183 | %{__make} |
8afa832f | 184 | %{?with_tests:%{__make} check} |
c5b54d7b ZU |
185 | |
186 | %install | |
187 | rm -rf $RPM_BUILD_ROOT | |
c5b54d7b | 188 | %{__make} install \ |
8afa832f | 189 | INSTALL='install -p' \ |
c5b54d7b ZU |
190 | DESTDIR=$RPM_BUILD_ROOT |
191 | ||
ca3eb368 | 192 | install -d $RPM_BUILD_ROOT/etc/{pam.d,security,rc.d/init.d,dbus-1/system.d} \ |
b30834b2 | 193 | $RPM_BUILD_ROOT%{bashdir} \ |
8afa832f | 194 | $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf.d \ |
d1bb4d34 | 195 | $RPM_BUILD_ROOT/home/services/xdm \ |
96fe17ec | 196 | $RPM_BUILD_ROOT%{_datadir}/xgreeters \ |
8afa832f | 197 | $RPM_BUILD_ROOT%{_datadir}/%{name}/{remote-sessions,%{name}.conf.d} \ |
aeb930bc | 198 | $RPM_BUILD_ROOT%{systemdunitdir} \ |
1281c6a0 | 199 | $RPM_BUILD_ROOT/var/lib/%{name}-data \ |
8afa832f ER |
200 | $RPM_BUILD_ROOT/var/{log,cache}/%{name} |
201 | ||
202 | install -d $RPM_BUILD_ROOT{/var/run/lightdm,%{systemdtmpfilesdir}} | |
203 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/lightdm.conf | |
96fe17ec | 204 | |
aeb930bc | 205 | # initscripts |
8afa832f ER |
206 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
207 | ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service | |
aeb930bc | 208 | |
8afa832f | 209 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name} |
9affbe56 ER |
210 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/lightdm-autologin |
211 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/lightdm-greeter | |
8afa832f | 212 | touch $RPM_BUILD_ROOT/etc/security/blacklist.%{name} |
d1bb4d34 | 213 | |
e8d8d6ad | 214 | # We don't ship AppAmor |
aeb930bc | 215 | rm -rv $RPM_BUILD_ROOT/etc/apparmor.d |
e8d8d6ad | 216 | |
d1bb4d34 JP |
217 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{lb,wae} |
218 | ||
b30834b2 JP |
219 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/bash-completion |
220 | cp -p data/bash-completion/{dm-tool,lightdm} $RPM_BUILD_ROOT%{bashdir} | |
221 | ||
a84ee4bd | 222 | %find_lang %{name} --with-gnome |
6330239a | 223 | |
c5b54d7b ZU |
224 | %clean |
225 | rm -rf $RPM_BUILD_ROOT | |
226 | ||
d1bb4d34 JP |
227 | %pre |
228 | %groupadd -g 55 -r -f xdm | |
229 | %useradd -u 55 -r -d /home/services/xdm -s /bin/false -c "X Display Manager" -g xdm xdm | |
230 | ||
1862114d ER |
231 | %postun |
232 | if [ "$1" = "0" ]; then | |
233 | %userremove xdm | |
234 | %groupremove xdm | |
235 | fi | |
236 | ||
8b528774 ER |
237 | %post libs-gobject -p /sbin/ldconfig |
238 | %postun libs-gobject -p /sbin/ldconfig | |
239 | ||
3d3d7bd6 JP |
240 | %post libs-qt5 -p /sbin/ldconfig |
241 | %postun libs-qt5 -p /sbin/ldconfig | |
6330239a | 242 | |
aeb930bc ER |
243 | %post init |
244 | /sbin/chkconfig --add %{name} | |
245 | %service -n %{name} restart | |
aeb930bc ER |
246 | %systemd_reload |
247 | ||
248 | %preun | |
249 | if [ "$1" = "0" ]; then | |
250 | /sbin/chkconfig --del %{name} | |
251 | %service %{name} stop | |
252 | fi | |
008e6bad | 253 | |
aeb930bc ER |
254 | %postun init |
255 | %systemd_reload | |
008e6bad | 256 | |
d1bb4d34 | 257 | %files -f %{name}.lang |
c5b54d7b | 258 | %defattr(644,root,root,755) |
eff0aaee | 259 | %doc NEWS |
933e01e3 | 260 | %dir %{_sysconfdir}/%{name} |
8afa832f | 261 | %dir %{_sysconfdir}/%{name}/%{name}.conf.d |
933e01e3 ER |
262 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf |
263 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/keys.conf | |
264 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/users.conf | |
8afa832f | 265 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name} |
15907466 BZ |
266 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/lightdm-autologin |
267 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/lightdm-greeter | |
8afa832f | 268 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.%{name} |
7b9123b4 | 269 | %{_datadir}/dbus-1/system.d/org.freedesktop.DisplayManager.conf |
933e01e3 | 270 | %attr(755,root,root) %{_bindir}/dm-tool |
d1bb4d34 | 271 | %attr(755,root,root) %{_sbindir}/lightdm |
ea4fcebf | 272 | %attr(755,root,root) %{_libexecdir}/lightdm-guest-session |
d1bb4d34 | 273 | %{_libdir}/girepository-1.0/LightDM-1.typelib |
8afa832f | 274 | %{systemdtmpfilesdir}/lightdm.conf |
1bcec040 | 275 | %{_datadir}/accountsservice/interfaces/org.freedesktop.DisplayManager.AccountsService.xml |
ea4fcebf JP |
276 | %{_datadir}/dbus-1/interfaces/org.freedesktop.DisplayManager.AccountsService.xml |
277 | %{_datadir}/polkit-1/actions/org.freedesktop.DisplayManager.AccountsService.policy | |
d1bb4d34 | 278 | %dir %{_datadir}/xgreeters |
8028cf24 ER |
279 | %dir %{_datadir}/%{name} |
280 | %dir %{_datadir}/%{name}/remote-sessions | |
8afa832f ER |
281 | %dir %{_datadir}/%{name}/%{name}.conf.d |
282 | %{_mandir}/man1/dm-tool.1* | |
283 | %{_mandir}/man1/%{name}.1* | |
284 | %dir %attr(710,root,root) /var/cache/%{name} | |
285 | %dir %attr(710,root,root) /var/log/%{name} | |
286 | %dir %attr(770,root,root) /var/run/%{name} | |
1281c6a0 | 287 | %dir %attr(700,root,root) /var/lib/%{name}-data |
d27af43d | 288 | %dir %attr(750,xdm,xdm) /home/services/xdm |
d1bb4d34 | 289 | |
8b528774 | 290 | %files libs-gobject |
9bc4da5d ER |
291 | %defattr(644,root,root,755) |
292 | %attr(755,root,root) %{_libdir}/liblightdm-gobject-1.so.*.*.* | |
293 | %attr(755,root,root) %ghost %{_libdir}/liblightdm-gobject-1.so.0 | |
9bc4da5d | 294 | |
f4c63304 | 295 | %if %{with qt5} |
3d3d7bd6 JP |
296 | %files libs-qt5 |
297 | %defattr(644,root,root,755) | |
298 | %attr(755,root,root) %{_libdir}/liblightdm-qt5-3.so.*.*.* | |
299 | %attr(755,root,root) %ghost %{_libdir}/liblightdm-qt5-3.so.0 | |
300 | ||
f4c63304 ER |
301 | %files libs-qt5-devel |
302 | %defattr(644,root,root,755) | |
303 | %{_libdir}/liblightdm-qt5-3.la | |
304 | %attr(755,root,root) %{_libdir}/liblightdm-qt5-3.so | |
305 | %{_includedir}/lightdm-qt5-3 | |
306 | %{_pkgconfigdir}/liblightdm-qt5-3.pc | |
307 | %endif | |
308 | ||
8b528774 | 309 | %files libs-gobject-devel |
c5b54d7b | 310 | %defattr(644,root,root,755) |
eccfdb7d | 311 | %{_datadir}/gir-1.0/LightDM-1.gir |
d1bb4d34 | 312 | %{_includedir}/lightdm-gobject-1 |
d1bb4d34 | 313 | %{_pkgconfigdir}/liblightdm-gobject-1.pc |
eccfdb7d ER |
314 | %{_libdir}/liblightdm-gobject-1.la |
315 | %attr(755,root,root) %{_libdir}/liblightdm-gobject-1.so | |
316 | # -vala | |
d1bb4d34 | 317 | %{_datadir}/vala/vapi/liblightdm-gobject-1.vapi |
4570a740 | 318 | %{_datadir}/vala/vapi/liblightdm-gobject-1.deps |
8b528774 | 319 | |
c5b54d7b ZU |
320 | %files apidocs |
321 | %defattr(644,root,root,755) | |
48783655 | 322 | %{_gtkdocdir}/lightdm-gobject-1 |
008e6bad | 323 | |
aeb930bc | 324 | %files init |
008e6bad | 325 | %defattr(644,root,root,755) |
aeb930bc | 326 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
8afa832f | 327 | %{systemdunitdir}/%{name}.service |
b30834b2 JP |
328 | |
329 | %files -n bash-completion-lightdm | |
330 | %defattr(644,root,root,755) | |
331 | %{bashdir}/dm-tool | |
332 | %{bashdir}/lightdm |