1 %define name xscreensaver
4 Summary: X screen saver and locker
10 Group: Amusements/Graphics
11 URL: http://www.jwz.org/xscreensaver/
12 Source0: http://www.jwz.org/xscreensaver/xscreensaver-%{version}.tar.gz
13 Vendor: Jamie Zawinski <jwz@jwz.org>
14 Buildroot: %{_tmppath}/%{name}-root
17 Summary: A minimal installation of xscreensaver.
18 Group: Amusements/Graphics
19 BuildPrereq: bc, pam-devel, xorg-x11-devel
20 BuildPrereq: gtk2-devel libglade2-devel
21 Requires: /etc/pam.d/system-auth, htmlview, desktop-backgrounds-basic
22 Provides: xscreensaver
23 Provides: xscreensaver-base
24 Obsoletes: xscreensaver
27 Summary: An enhanced set of screensavers.
28 Group: Amusements/Graphics
29 Requires: xscreensaver-base
32 Summary: An enhanced set of screensavers that require OpenGL.
33 Group: Amusements/Graphics
34 Requires: xscreensaver-base
35 Obsoletes: xscreensaver-gl
38 A modular screen saver and locker for the X Window System.
39 More than 190 display modes are included in this package.
42 A modular screen saver and locker for the X Window System.
43 This package contains the bare minimum needed to blank and
44 lock your screen. The graphical display modes are the
45 "xscreensaver-extras" and "xscreensaver-gl-extras" packages.
48 A modular screen saver and locker for the X Window System.
49 This package contains a variety of graphical screen savers for
50 your mind-numbing, ambition-eroding, time-wasting, hypnotized
53 %description gl-extras
54 A modular screen saver and locker for the X Window System.
55 This package contains a variety of OpenGL-based (3D) screen
56 savers for your mind-numbing, ambition-eroding, time-wasting,
57 hypnotized viewing pleasure.
62 if [ -x %{_datadir}/libtool/config.guess ]; then
63 # use system-wide copy
64 cp -p %{_datadir}/libtool/config.{sub,guess} .
68 archdir=`./config.guess`
72 export CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}"
74 CONFIG_OPTS="--prefix=/usr --with-pam --without-shadow --without-kerberos"
76 # Red Hat doesn't like this:
77 CONFIG_OPTS="$CONFIG_OPTS --with-setuid-hacks"
80 # CONFIG_OPTS="$CONFIG_OPTS --with-login-manager"
83 %configure $CONFIG_OPTS
89 archdir=`./config.guess`
92 rm -rf ${RPM_BUILD_ROOT}
94 # We have to make sure these directories exist,
95 # or nothing will be installed into them.
97 mkdir -p $RPM_BUILD_ROOT%{_bindir} \
98 $RPM_BUILD_ROOT%{_datadir}/xscreensaver \
99 $RPM_BUILD_ROOT%{_libexecdir}/xscreensaver \
100 $RPM_BUILD_ROOT%{_mandir}/man1/xscreensaver \
101 $RPM_BUILD_ROOT/etc/pam.d
103 make install_prefix=$RPM_BUILD_ROOT install
105 desktop-file-install --vendor gnome --delete-original \
106 --dir $RPM_BUILD_ROOT%{_datadir}/applications \
107 $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
109 # This function prints a list of things that get installed.
110 # It does this by parsing the output of a dummy run of "make install".
113 make -s install_prefix=${RPM_BUILD_ROOT} INSTALL=true "$@" \
114 | sed -n -e 's@.* \(/[^ ]*\)$@\1@p' \
115 | sed -e "s@^${RPM_BUILD_ROOT}@@" \
116 -e "s@/[a-z][a-z]*/\.\./@/@" \
117 | sed -e 's@\(.*/man/.*\)@\1\*@' \
118 | sed -e 's@\(.*/app-defaults/\)@%config \1@' \
119 -e 's@\(.*/pam\.d/\)@%config(missingok) \1@' \
123 # Generate three lists of files for the three packages.
125 dd=%{_builddir}/%{name}-%{version}
126 ( cd hacks ; list_files install ) > $dd/extras.files
127 ( cd hacks/glx ; list_files install ) > $dd/gl-extras.files
128 ( cd driver ; list_files install ) > $dd/base.files
129 ( cd po ; list_files install ) >> $dd/base.files
131 # jwz: I get "find-lang.sh: No translations found for xscreensaver" on FC3
133 #cat %{name}.lang >> $dd/base.files
135 # Make sure all files are readable by all, and writable only by owner.
137 chmod -R a+r,u+w,og-w ${RPM_BUILD_ROOT}
140 rm -rf ${RPM_BUILD_ROOT}
143 # This part runs on the end user's system, when the RPM is installed.
145 pids=`/sbin/pidof xscreensaver`
146 if [ -n "$pids" ]; then
147 echo "sending SIGHUP to running xscreensaver ($pids)..." >&2
151 %files -f base.files base
152 %defattr(-,root,root)
154 %files -f extras.files extras
155 %defattr(-,root,root)
157 %files -f gl-extras.files gl-extras
158 %defattr(-,root,root)