1 %define name xscreensaver
5 %define x11_prefix /usr/X11R6
6 %define gnome_prefix /usr
7 %define gnome_datadir %{gnome_prefix}/share
9 # By default, builds the basic, non-GL package.
10 # To build both the basic and GL-add-on packages:
11 # rpm --define "USE_GL yes" ...
12 # or uncomment the following line.
15 Summary: X screen saver and locker
16 Summary(fr): Economiseur d'écran et verrouillage de terminaux X
21 Group: Amusements/Graphics
23 URL: http://www.jwz.org/xscreensaver/
24 Vendor: Jamie Zawinski <jwz@jwz.org>
25 Source: %{name}-%{version}.tar.gz
26 Buildroot: %{_tmppath}/%{name}-%{version}-root
28 # This package really should be made to depend on
29 # control-center >= 1.4.0.2 -OR- control-center >= 1.5.12
30 # but there's no way to express that.
33 A modular screen saver and locker for the X Window System.
34 Highly customizable: allows the use of any program that
35 can draw on the root window as a display mode.
36 More than 190 display modes are included in this package.
37 %{?USE_GL:See also the xscreensaver-gl package, which}
38 %{?USE_GL:includes optional OpenGL display modes.}
41 Un économiseur d'écran et verrouillage modulaire pour X-Window.
42 Hautement configurable: permet l'utilisation de n'importe quel programme
43 qui peut dessiner dans la fenêtre root.
44 Plus de 190 modes d'affichage sont inclus dans ce paquet.
45 %{?USE_GL:Voir aussi le paquet xscreensaver-gl, qui inclut}
46 %{?USE_GL:des modules optionnels OpenGL.}
48 %{?USE_GL:%package gl}
49 %{?USE_GL:Group: Amusements/Graphics}
50 %{?USE_GL:Requires: xscreensaver = %{epoch}:%{version}-%{release}}
51 %{?USE_GL:Summary: A set of GL screensavers}
52 %{?USE_GL:Summary(fr): Un ensemble d'économiseurs d'écran OpenGL}
53 %{?USE_GL:%description gl}
54 %{?USE_GL:The xscreensaver-gl package contains even more screensavers for your}
55 %{?USE_GL:mind-numbing, ambition-eroding, time-wasting, hypnotized viewing}
56 %{?USE_GL:pleasure. These screensavers require OpenGL or Mesa support.}
58 %{?USE_GL:Install the xscreensaver-gl package if you need more screensavers}
59 %{?USE_GL:for use with the X Window System and you have OpenGL or Mesa}
61 %{?USE_GL:%description -l fr gl}
62 %{?USE_GL:Le paquet xscreensaver-gl contient encore plus d'économiseurs}
63 %{?USE_GL:d'écran pour votre plaisir visuel.}
65 %{?USE_GL:Ces économiseurs d'écran nécessitent OpenGL ou Mesa.}
66 %{?USE_GL:Installez le paquet xscreensaver-gl si vous désirez plus}
67 %{?USE_GL:d'économiseur d'écran et que vous avez OpenGL ou Mesa installé.}
75 # On Solaris, build without PAM and with Shadow.
76 # On other systems, build with PAM and without Shadow.
79 RPMOPTS="$RPMOPTS --without-pam"
81 RPMOPTS="$RPMOPTS --with-pam --without-shadow"
84 %{?USE_GL:RPMOPTS="$RPMOPTS --with-gl"}
85 %{!?USE_GL:RPMOPTS="$RPMOPTS --without-gl"}
87 archdir=`./config.guess`
90 CFLAGS="$RPM_OPT_FLAGS" \
91 ../configure --prefix=%{x11_prefix} \
98 archdir=`./config.guess`
100 # We have to make sure these directories exist,
101 # or nothing will be installed into them.
103 mkdir -p $RPM_BUILD_ROOT%{gnome_datadir}
104 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
107 make install_prefix=$RPM_BUILD_ROOT \
108 AD_DIR=%{x11_prefix}/lib/X11/app-defaults \
109 GNOME_BINDIR=%{gnome_prefix}/bin \
112 # This function prints a list of things that get installed.
113 # It does this by parsing the output of a dummy run of "make install".
116 make -s install_prefix=$RPM_BUILD_ROOT INSTALL=true \
117 GNOME_BINDIR=%{gnome_prefix}/bin \
119 sed -n -e 's@.* \(/[^ ]*\)$@\1@p' |
120 sed -e "s@^$RPM_BUILD_ROOT@@" \
121 -e "s@/[a-z][a-z]*/\.\./@/@" |
122 sed -e 's@\(.*/man/.*\)@\1\*@' |
126 # Collect the names of the non-GL executables and scripts...
127 # (Including the names of all of the Gnome and L10N-related files,
128 # whereever they might have gotten installed...)
129 # For the translation catalogs, prepend an appropriate %lang(..) tag.
131 ( cd hacks ; list_files install ; \
132 cd ../driver; list_files install-program install-scripts install-gnome ; \
133 ( cd ../po; list_files install | grep '\.' \
134 | sed 's@^\(.*/\([^/]*\)/LC.*\)$@%lang(\2) \1@' ) \
135 ) > $RPM_BUILD_DIR/xscreensaver-%{version}/exes-non-gl
138 # Collect the names of the GL-only executables...
140 ( cd hacks/glx ; list_files install ) \
141 | grep -v man1/xscreensaver-gl-helper \
142 > $RPM_BUILD_DIR/xscreensaver-%{version}/exes-gl
144 # This line is redundant, except that it causes the "xscreensaver"
145 # executable to be installed unstripped (while all others are stripped.)
146 # You should install it this way so that jwz gets useful bug reports.
148 install -m 4755 driver/xscreensaver $RPM_BUILD_ROOT%{x11_prefix}/bin
150 # Even if we weren't compiled with PAM support, make sure to include
151 # the PAM module file in the RPM anyway, just in case.
154 make install_prefix=$RPM_BUILD_ROOT PAM_DIR=/etc/pam.d install-pam )
156 # Make sure all files are readable by all, and writable only by owner.
158 chmod -R a+r,u+w,og-w $RPM_BUILD_ROOT
161 # This part runs on the end user's system, when the RPM is installed.
163 pids=`/sbin/pidof xscreensaver`
164 if [ -n "$pids" ]; then
165 echo "sending SIGHUP to running xscreensaver ($pids)..." >&2
170 if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT ; fi
171 if [ -d $RPM_BUILD_ROOT-gl ]; then rm -r $RPM_BUILD_ROOT-gl ; fi
173 # Files for the "xscreensaver" package:
175 %files -f exes-non-gl
176 %defattr(-,root,root)
178 %doc README README.debugging
179 %dir %{x11_prefix}/lib/xscreensaver
180 %config %{x11_prefix}/lib/X11/app-defaults/*
181 %{x11_prefix}/man/man1/xscreensaver*
184 # Files for the "xscreensaver-gl" package:
186 %{?USE_GL:%files -f exes-gl gl}
187 %{?USE_GL:%defattr(-,root,root)}