1 %define name xscreensaver
5 %define x11_prefix /usr/X11R6
6 %define gnome_prefix /usr
7 %define kde_prefix /usr
8 %define gnome_datadir %{gnome_prefix}/share
10 # By default, builds the basic, non-GL package.
11 # To build both the basic and GL-add-on packages:
12 # rpm --define "USE_GL yes" ...
13 # or uncomment the following line.
16 Summary: X screen saver and locker
17 Summary(fr): Economiseur d'écran et verrouillage de terminaux X
22 Group: Amusements/Graphics
24 URL: http://www.jwz.org/xscreensaver
25 Vendor: Jamie Zawinski <jwz@jwz.org>
26 Source: %{name}-%{version}.tar.gz
27 Buildroot: %{_tmppath}/%{name}-%{version}-root
29 # This package really should be made to depend on
30 # control-center >= 1.4.0.2 -OR- control-center >= 1.5.12
31 # but there's no way to express that.
34 A modular screen saver and locker for the X Window System.
35 Highly customizable: allows the use of any program that
36 can draw on the root window as a display mode.
37 More than 160 display modes are included in this package.
38 %{?USE_GL:See also the xscreensaver-gl package, which}
39 %{?USE_GL:includes optional OpenGL display modes.}
42 Un économiseur d'écran et verrouillage modulaire pour X-Window.
43 Hautement configurable: permet l'utilisation de n'importe quel programme
44 qui peut dessiner dans la fenêtre root.
45 Plus de 160 modes d'affichage sont inclus dans ce paquet.
46 %{?USE_GL:Voir aussi le paquet xscreensaver-gl, qui inclut}
47 %{?USE_GL:des modules optionnels OpenGL.}
49 %{?USE_GL:%package gl}
50 %{?USE_GL:Group: Amusements/Graphics}
51 %{?USE_GL:Requires: xscreensaver = %{version}}
52 %{?USE_GL:Summary: A set of GL screensavers}
53 %{?USE_GL:Summary(fr): Un ensemble d'économiseurs d'écran OpenGL}
54 %{?USE_GL:%description gl}
55 %{?USE_GL:The xscreensaver-gl package contains even more screensavers for your}
56 %{?USE_GL:mind-numbing, ambition-eroding, time-wasting, hypnotized viewing}
57 %{?USE_GL:pleasure. These screensavers require OpenGL or Mesa support.}
59 %{?USE_GL:Install the xscreensaver-gl package if you need more screensavers}
60 %{?USE_GL:for use with the X Window System and you have OpenGL or Mesa}
62 %{?USE_GL:%description -l fr gl}
63 %{?USE_GL:Le paquet xscreensaver-gl contient encore plus d'économiseurs}
64 %{?USE_GL:d'écran pour votre plaisir visuel.}
66 %{?USE_GL:Ces économiseurs d'écran nécessitent OpenGL ou Mesa.}
67 %{?USE_GL:Installez le paquet xscreensaver-gl si vous désirez plus}
68 %{?USE_GL:d'économiseur d'écran et que vous avez OpenGL ou Mesa installé.}
76 # On Solaris, build without PAM and with Shadow.
77 # On other systems, build with PAM and without Shadow.
80 RPMOPTS="$RPMOPTS --without-pam"
82 RPMOPTS="$RPMOPTS --with-pam --without-shadow"
85 %{?USE_GL:RPMOPTS="$RPMOPTS --with-gl"}
86 %{!?USE_GL:RPMOPTS="$RPMOPTS --without-gl"}
88 archdir=`./config.guess`
91 CFLAGS="$RPM_OPT_FLAGS" \
92 ../configure --prefix=%{x11_prefix} \
99 archdir=`./config.guess`
101 # We have to make sure these directories exist,
102 # or nothing will be installed into them.
104 export KDEDIR=%{kde_prefix}
105 mkdir -p $RPM_BUILD_ROOT$KDEDIR/bin
106 mkdir -p $RPM_BUILD_ROOT%{gnome_datadir}
107 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
110 make install_prefix=$RPM_BUILD_ROOT \
111 AD_DIR=%{x11_prefix}/lib/X11/app-defaults \
112 GNOME_BINDIR=%{gnome_prefix}/bin \
115 # This function prints a list of things that get installed.
116 # It does this by parsing the output of a dummy run of "make install".
119 make -s install_prefix=$RPM_BUILD_ROOT INSTALL=true \
120 GNOME_BINDIR=%{gnome_prefix}/bin \
122 sed -n -e 's@.* \(/[^ ]*\)$@\1@p' |
123 sed -e "s@^$RPM_BUILD_ROOT@@" \
124 -e "s@/[a-z][a-z]*/\.\./@/@" |
125 sed -e 's@\(.*/man/.*\)@\1\*@' |
129 # Collect the names of the non-GL executables and scripts...
130 # (Including the names of all of the Gnome, KDE, and L10N-related files,
131 # whereever they might have gotten installed...)
132 # For the translation catalogs, prepend an appropriate %lang(..) tag.
134 ( cd hacks ; list_files install ; \
135 cd ../driver; list_files install-program install-scripts \
136 install-gnome install-kde ; \
137 ( cd ../po; list_files install | grep '\.' \
138 | sed 's@^\(.*/\([^/]*\)/LC.*\)$@%lang(\2) \1@' ) \
139 ) > $RPM_BUILD_DIR/xscreensaver-%{version}/exes-non-gl
142 # Collect the names of the GL-only executables...
144 ( cd hacks/glx ; list_files install ) \
145 | grep -v man1/xscreensaver-gl-helper \
146 > $RPM_BUILD_DIR/xscreensaver-%{version}/exes-gl
148 # This line is redundant, except that it causes the "xscreensaver"
149 # executable to be installed unstripped (while all others are stripped.)
150 # You should install it this way so that jwz gets useful bug reports.
152 install -m 4755 driver/xscreensaver $RPM_BUILD_ROOT%{x11_prefix}/bin
154 # Even if we weren't compiled with PAM support, make sure to include
155 # the PAM module file in the RPM anyway, just in case.
158 make install_prefix=$RPM_BUILD_ROOT PAM_DIR=/etc/pam.d install-pam )
160 # Make sure all files are readable by all, and writable only by owner.
162 chmod -R a+r,u+w,og-w $RPM_BUILD_ROOT
165 # This part runs on the end user's system, when the RPM is installed.
167 pids=`pidof xscreensaver`
168 if [ -n "$pids" ]; then
169 echo "sending SIGHUP to running xscreensaver ($pids)..." >&2
174 if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT ; fi
175 if [ -d $RPM_BUILD_ROOT-gl ]; then rm -r $RPM_BUILD_ROOT-gl ; fi
177 # Files for the "xscreensaver" package:
179 %files -f exes-non-gl
180 %defattr(-,root,root)
182 %doc README README.debugging
183 %dir %{x11_prefix}/lib/xscreensaver
184 %config %{x11_prefix}/lib/X11/app-defaults/*
185 %{x11_prefix}/man/man1/xscreensaver*
188 # Files for the "xscreensaver-gl" package:
190 %{?USE_GL:%files -f exes-gl gl}
191 %{?USE_GL:%defattr(-,root,root)}
194 * Wed Mar 05 2003 Eric Lassauge <lassauge@mail.dotcom.fr>
195 - Updated for xscreensaver-4.08 with french translations