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