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