]> git.pld-linux.org Git - packages/xscreensaver.git/blob - xscreensaver.spec
- up to 6.08
[packages/xscreensaver.git] / xscreensaver.spec
1 Summary:        X screen savers
2 Summary(de.UTF-8):      X-Bildschirmschoner
3 Summary(es.UTF-8):      Protectores de pantalla X
4 Summary(fr.UTF-8):      Economiseurs d'écran X
5 Summary(pl.UTF-8):      Wygaszacze ekranu pod X Window
6 Summary(pt_BR.UTF-8):   Salvadores de tela X
7 Summary(ru.UTF-8):      Набор программ хранения экрана для X Window
8 Summary(uk.UTF-8):      Набір програм збереження екрану для X Window
9 Summary(zh_CN.UTF-8):   X 窗口系统保护器
10 Name:           xscreensaver
11 Version:        6.08
12 Release:        1
13 Epoch:          1
14 License:        BSD
15 Group:          X11/Applications
16 Source0:        https://www.jwz.org/xscreensaver/%{name}-%{version}.tar.gz
17 # Source0-md5:  d64f3fdb8881c735fff4601ec5d88e1f
18 Source1:        %{name}-autostart.desktop
19 Source2:        %{name}-lock.desktop
20 Source3:        %{name}.pamd
21 Patch0:         %{name}-desktop.patch
22 URL:            https://www.jwz.org/xscreensaver/
23 BuildRequires:  EGL-devel
24 BuildRequires:  OpenGL-GLU-devel
25 BuildRequires:  OpenGL-devel >= 1.3
26 BuildRequires:  autoconf >= 2.69
27 BuildRequires:  automake
28 BuildRequires:  bc
29 BuildRequires:  gdk-pixbuf2-xlib-devel >= 2.0.0
30 BuildRequires:  gettext-tools
31 BuildRequires:  gle-devel
32 BuildRequires:  glib2-devel >= 2.0.0
33 BuildRequires:  gtk+2-devel >= 1:2.22.0
34 BuildRequires:  intltool
35 BuildRequires:  libjpeg-devel
36 BuildRequires:  libtool
37 BuildRequires:  libxml2-devel >= 2.4.22
38 BuildRequires:  pam-devel >= 0.77.3
39 BuildRequires:  perl-base
40 BuildRequires:  perl-perldoc
41 BuildRequires:  pkgconfig
42 BuildRequires:  rpmbuild(macros) >= 1.745
43 BuildRequires:  systemd-devel >= 1:221
44 BuildRequires:  xorg-lib-libICE-devel
45 BuildRequires:  xorg-lib-libX11-devel
46 BuildRequires:  xorg-lib-libXext-devel
47 BuildRequires:  xorg-lib-libXft-devel >= 2.1.0
48 BuildRequires:  xorg-lib-libXi-devel
49 BuildRequires:  xorg-lib-libXinerama-devel
50 BuildRequires:  xorg-lib-libXrandr-devel
51 BuildRequires:  xorg-lib-libXt-devel
52 BuildRequires:  xorg-lib-libXxf86vm-devel
53 Requires:       %{name}-savers = %{epoch}:%{version}-%{release}
54 Requires:       gtk+2 >= 1:2.22.0
55 Requires:       pam >= 0.77.3
56 Requires:       xdg-utils
57 Requires:       xorg-lib-libXt >= 1.0.0
58 # for screensaver-getimage-file
59 Suggests:       perl-perldoc
60 # for xscreensaver-text
61 Suggests:       xorg-app-appres
62 Obsoletes:      xscreensaver-gnome < 1:4.06
63 Obsoletes:      xscreensaver-gnome1 < 1:4.21
64 Obsoletes:      xscreensaver-gnome2 < 1:5.06
65 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66
67 %define         _sysconfdir     /etc/X11
68 %define         _appdefsdir     /usr/share/X11/app-defaults
69
70 %description
71 Screen savers of every sort are included in this package, guaranteeing
72 hours of enjoyment and monitor saving. And if you are bent on really
73 saving your monitor, there's that old classic, the plain black screen.
74
75 %description -l de.UTF-8
76 Dieses Paket enthält eine Sammlung verschiedenster Bildschirmschoner.
77 Stundenlanger Spaß ist garantiert. Und wenn Sie Ihren Bildschirm
78 wirklich schonen möchten, gibt's den alten Klassiker, den einfachen
79 schwarzen Bildschirm.
80
81 %description -l es.UTF-8
82 En este paquete están incluidos protectores de pantalla, de todos los
83 tipos, garantizando horas de diversión para tu monitor. Y si realmente
84 estás inclinado a la protección de tu monitor, existe aquel antiguo y
85 clásico protector, la "pantalla negra".
86
87 %description -l fr.UTF-8
88 Des économiseurs d'écran de chaque sorte sont inclus dans ce paquet,
89 guarantissant des heures de plaisir et d'économies d'écran. Et si vous
90 êtes voulez vraiment économiser votre écran, il y a ce vieux
91 classique, l'écran tout noir.
92
93 %description -l pl.UTF-8
94 Każdy wygaszacz ekranu dołączony do tego pakietu zapewnia godziny
95 zadowolenia i oszczędzania monitora. Jeśli bardzo Ci zależy na
96 oszczędzaniu monitora to jest też dostępny klasyczny "czysty" czarny
97 wygaszacz.
98
99 %description -l pt_BR.UTF-8
100 Protetores de tela de todos os tipos estão incluídos neste pacote,
101 garantindo horas de divertimento para o seu monitor. E se você
102 realmente está inclinado à proteção do seu monitor, existe aquele
103 velho clássico, a "tela preta".
104
105 %description -l ru.UTF-8
106 Пакет xscreensaver содержит разнообразные программы хранения экрана.
107
108 %description -l uk.UTF-8
109 Пакет xscreensaver містить різноманітні програми збереження екрану.
110
111 %package common
112 Summary:        Common X screen savers files
113 Summary(pl.UTF-8):      Pliki wspólne dla podpakietów wygaszaczy ekranu
114 Group:          X11/Applications
115
116 %description common
117 Common X screen savers files.
118
119 %description common -l pl.UTF-8
120 Pliki wspólne dla podpakietów wygaszaczy ekranu.
121
122 %package base
123 Summary:        Base X screen savers
124 Summary(pl.UTF-8):      Podstawowe wygaszacze ekranu pod X Window
125 Group:          X11/Applications
126 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
127 Requires:       perl-HTML-Parser
128 Requires:       perl-LWP-Protocol-https
129 Requires:       xorg-lib-libXft >= 2.1.0
130 Provides:       %{name}-savers = %{epoch}:%{version}-%{release}
131
132 %description base
133 Base screen savers for X Window.
134
135 %description base -l pl.UTF-8
136 Podstawowe wygaszacze ekranu pod X Window.
137
138 %package GL
139 Summary:        OpenGL X screen savers
140 Summary(pl.UTF-8):      Wygaszacze ekranu pod X Window używające OpenGL
141 Summary(pt_BR.UTF-8):   Protetores de tela GL
142 Group:          X11/Applications
143 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
144 Requires:       xorg-lib-libXft >= 2.1.0
145 Provides:       %{name}-savers = %{epoch}:%{version}-%{release}
146 # for starwars req: xscreensaver-text
147 Suggests:       %{name}
148
149 %description GL
150 Screen savers which uses OpenGL libraries.
151
152 %description GL -l pl.UTF-8
153 Wygaszacze ekranu pod X Window używające OpenGL.
154
155 %description GL -l pt_BR.UTF-8
156 Ainda mais protetores de tela, usando a biblioteca 3D OpenGL.
157
158 %package GLE
159 Summary:        OpenGL & GLE X screen savers
160 Summary(pl.UTF-8):      Wygaszacze ekranu pod X Window używające OpenGL i GLE
161 Group:          X11/Applications
162 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
163 Requires:       xorg-lib-libXft >= 2.1.0
164 Provides:       %{name}-savers = %{epoch}:%{version}-%{release}
165
166 %description GLE
167 Screen savers which uses OpenGL and GLE libraries.
168
169 %description GLE -l pl.UTF-8
170 Wygaszacze ekranu pod X Window używające OpenGL oraz GLE.
171
172 %prep
173 %setup -q
174 %patch0 -p1
175
176 # fix encoding (xscreensaver-6.05: actual encoding is ISO-8869-1, but file specifies UTF-8)
177 iconv -f iso-8859-1 -t utf-8 po/ca.po -o po/ca.po.tmp
178 %{__mv} po/ca.po.tmp po/ca.po
179
180 # from Fedora:
181 # xscreensaver 6.03: manually fix po/Makefile.in.in
182 cd po
183 sed -i Makefile.in.in \
184         -e "\@^POFILES[ \t]*=@s@^.*@POTFILES\t=$(ls -1 *po | while read f ; do echo -n -e " $f" ; done)@" \
185         -e "\@^GMOFILES[ \t]*=@s@^.*@GMOTFILES\t=$(ls -1 *po | while read f ; do echo -n -e " ${f%.po}.gmo" ; done)@" \
186         -e "\@^CATALOGS[ \t]*=@s@^.*@CATALOGS\t=$(ls -1 *po | while read f ; do echo -n -e " ${f%.po}.gmo" ; done)@" \
187         -e "\@^CATOBJEXT[ \t]*=@s@^.*@CATOBJEXT\t= .gmo@" \
188         -e "\@^INSTOBJEXT[ \t]*=@s@^.*@INSTOBJEXT\t= .mo@" \
189         -e "\@^MKINSTALLDIRS[ \t]*=@s@^.*@MKINSTALLDIRS\t= install -d@" \
190         %{nil}
191 cd -
192
193 # fix shebangs
194 %{__sed} -i '1s,/usr/bin/env xdg-open$,/usr/bin/xdg-open,' \
195                 driver/{xscreensaver-settings.desktop.in,xscreensaver.desktop.in}
196
197 %build
198 %configure \
199         --with-x \
200         --with-dpms-ext \
201         --with-xf86vmode-ext \
202         --with-xinerama-ext \
203         --with-randr-ext \
204         --with-xinput-ext \
205         --with-xf86gamma-ext \
206         --with-xshm-ext \
207         --with-xdbe-ext \
208         --with-xkb-ext \
209         --with-proc-interrupts \
210         --with-proc-oom \
211         --with-systemd \
212         --with-pam \
213         --with-shadow \
214         --with-gtk \
215         --with-gl \
216         --with-gle \
217         --with-jpeg \
218         --with-png \
219         --with-pixbuf \
220         --with-xft \
221         --with-hackdir=%{_libdir}/xscreensaver \
222         --with-configdir=%{_datadir}/xscreensaver \
223         --enable-locking \
224         --without-login-manager \
225         --without-kerberos \
226         --without-motif
227
228 %{__make} all
229
230 %install
231 rm -rf $RPM_BUILD_ROOT
232
233 %{__make} install \
234         DESTDIR=$RPM_BUILD_ROOT \
235         install_sh=$(pwd)/install-sh \
236         install_prefix=$RPM_BUILD_ROOT \
237         AD_DIR=%{_appdefsdir} \
238         PAM_DIR=/etc/pam.d
239
240 install -d $RPM_BUILD_ROOT{/etc/{pam.d,xdg/autostart},%{_desktopdir}}
241
242 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/xdg/autostart
243 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
244
245 %{__make} -C driver install-pam \
246         PAM_DIR=$RPM_BUILD_ROOT/etc/pam.d
247 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/xscreensaver
248
249 _DIR=$(pwd)
250 cd $RPM_BUILD_ROOT%{_libdir}/%{name}
251
252 echo '%defattr(644,root,root,755)' > $_DIR/files.base
253 echo '%defattr(644,root,root,755)' > $_DIR/files.gl
254 echo '%defattr(644,root,root,755)' > $_DIR/files.gle
255
256 find_config_and_man()
257 {
258         if test -e $RPM_BUILD_ROOT%{_datadir}/%{name}/${1}.xml ; then
259                 echo %{_datadir}/%{name}/${1}.xml
260         fi
261         if test -e $RPM_BUILD_ROOT%{_mandir}/man6/${1}.6 ; then
262                 %{__mv} $RPM_BUILD_ROOT%{_mandir}/man6/{,xscreensaver-}${1}.6
263                 echo %{_mandir}/man6/xscreensaver-${1}.6'*'
264                 # these two conflict with other packages
265                 if [ ${1} != barcode -a ${1} != flame ]; then
266                         echo ".so xscreensaver-${1}.6" > $RPM_BUILD_ROOT%{_mandir}/man6/${1}.6
267                         echo %{_mandir}/man6/${1}.6'*'
268                 fi
269         fi
270 }
271
272 for file in *; do
273         _REQUIRES=$(objdump -p $file 2> /dev/null | awk '
274                 BEGIN { START=0; LIBNAME=""; }
275                 /Dynamic Section:/ { START=1; }
276                 /NEEDED/ && (START==1) {
277                         LIBNAME=$2;
278                 }
279                 (START==1) && (LIBNAME!="") { print LIBNAME; }
280                 /^$/ { START=0; }')
281
282         if echo "$_REQUIRES" | grep -q "libgle.so"; then
283                 echo "%attr(755,root,root) %{_libdir}/xscreensaver/$file" >> $_DIR/files.gle
284                 find_config_and_man $file >> $_DIR/files.gle
285         elif echo "$_REQUIRES" | grep -q "libGLU.so"; then
286                 echo "%attr(755,root,root) %{_libdir}/xscreensaver/$file" >> $_DIR/files.gl
287                 find_config_and_man $file >> $_DIR/files.gl
288         else
289                 echo "%attr(755,root,root) %{_libdir}/xscreensaver/$file" >> $_DIR/files.base
290                 find_config_and_man $file >> $_DIR/files.base
291         fi
292 done
293
294 cd $_DIR
295
296 %find_lang %{name} --all-name
297
298 %clean
299 rm -rf $RPM_BUILD_ROOT
300
301 %post
302 %update_desktop_database_post
303
304 %postun
305 %update_desktop_database_postun
306
307 %files -f %{name}.lang
308 %defattr(644,root,root,755)
309 %doc README README.hacking
310 %attr(755,root,root) %{_bindir}/xscreensaver
311 %attr(755,root,root) %{_bindir}/xscreensaver-command
312 %attr(755,root,root) %{_bindir}/xscreensaver-demo
313 %attr(755,root,root) %{_bindir}/xscreensaver-settings
314 %dir %{_datadir}/%{name}
315 %doc %{_datadir}/%{name}/README
316 %{_datadir}/%{name}/xscreensaver.service
317 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/xscreensaver
318 /etc/xdg/autostart/xscreensaver-autostart.desktop
319 %{_appdefsdir}/XScreenSaver
320 %{_mandir}/man1/xscreensaver.1*
321 %{_mandir}/man1/xscreensaver-command.1*
322 %{_mandir}/man1/xscreensaver-demo.1*
323 %{_mandir}/man1/xscreensaver-settings.1*
324 %{_desktopdir}/xscreensaver-lock.desktop
325 %{_desktopdir}/xscreensaver-settings.desktop
326 %{_desktopdir}/xscreensaver.desktop
327 %{_pixmapsdir}/xscreensaver.png
328
329 %files common
330 %defattr(644,root,root,755)
331 %dir %{_libdir}/%{name}
332 %dir %{_fontsdir}/xscreensaver
333 %{_fontsdir}/xscreensaver/*.ttf
334
335 %files base -f files.base
336 %defattr(644,root,root,755)
337
338 %files GL -f files.gl
339 %defattr(644,root,root,755)
340
341 %files GLE -f files.gle
342 %defattr(644,root,root,755)
This page took 0.130096 seconds and 4 git commands to generate.