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
20 BuildRequires: gettext
21 BuildRequires: pam-devel
22 BuildRequires: gtk2-devel
23 BuildRequires: desktop-file-utils
25 BuildRequires: xorg-x11-devel
26 BuildRequires: libglade2-devel
28 #BuildRequires: libxorg-x11-devel
29 #BuildRequires: libglade2.0_0-devel
31 Requires: /etc/pam.d/system-auth
33 Requires: desktop-backgrounds-basic
34 Provides: xscreensaver
35 Provides: xscreensaver-base
36 Obsoletes: xscreensaver
39 Summary: An enhanced set of screensavers.
40 Group: Amusements/Graphics
41 Requires: xscreensaver-base
44 Summary: An enhanced set of screensavers that require OpenGL.
45 Group: Amusements/Graphics
46 Requires: xscreensaver-base
47 Obsoletes: xscreensaver-gl
50 A modular screen saver and locker for the X Window System.
51 More than 190 display modes are included in this package.
54 A modular screen saver and locker for the X Window System.
55 This package contains the bare minimum needed to blank and
56 lock your screen. The graphical display modes are the
57 "xscreensaver-extras" and "xscreensaver-gl-extras" packages.
60 A modular screen saver and locker for the X Window System.
61 This package contains a variety of graphical screen savers for
62 your mind-numbing, ambition-eroding, time-wasting, hypnotized
65 %description gl-extras
66 A modular screen saver and locker for the X Window System.
67 This package contains a variety of OpenGL-based (3D) screen
68 savers for your mind-numbing, ambition-eroding, time-wasting,
69 hypnotized viewing pleasure.
74 if [ -x %{_datadir}/libtool/config.guess ]; then
75 # use system-wide copy
76 cp -p %{_datadir}/libtool/config.{sub,guess} .
80 archdir=`./config.guess`
84 export CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}"
86 CONFIG_OPTS="--prefix=/usr --with-pam --without-shadow --without-kerberos"
88 # Red Hat doesn't like this:
89 CONFIG_OPTS="$CONFIG_OPTS --with-setuid-hacks"
92 # CONFIG_OPTS="$CONFIG_OPTS --with-login-manager"
95 %configure $CONFIG_OPTS
101 archdir=`./config.guess`
104 rm -rf ${RPM_BUILD_ROOT}
106 # We have to make sure these directories exist,
107 # or nothing will be installed into them.
109 mkdir -p $RPM_BUILD_ROOT%{_bindir} \
110 $RPM_BUILD_ROOT%{_datadir}/xscreensaver \
111 $RPM_BUILD_ROOT%{_libexecdir}/xscreensaver \
112 $RPM_BUILD_ROOT%{_mandir}/man1/xscreensaver \
113 $RPM_BUILD_ROOT/etc/pam.d
115 make install_prefix=$RPM_BUILD_ROOT install
117 desktop-file-install --vendor gnome --delete-original \
118 --dir $RPM_BUILD_ROOT%{_datadir}/applications \
119 $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
121 # This function prints a list of things that get installed.
122 # It does this by parsing the output of a dummy run of "make install".
125 make -s install_prefix=${RPM_BUILD_ROOT} INSTALL=true "$@" \
126 | sed -n -e 's@.* \(/[^ ]*\)$@\1@p' \
127 | sed -e "s@^${RPM_BUILD_ROOT}@@" \
128 -e "s@/[a-z][a-z]*/\.\./@/@" \
129 | sed -e 's@\(.*/man/.*\)@\1\*@' \
130 | sed -e 's@\(.*/app-defaults/\)@%config \1@' \
131 -e 's@\(.*/pam\.d/\)@%config(missingok) \1@' \
135 # Generate three lists of files for the three packages.
137 dd=%{_builddir}/%{name}-%{version}
138 ( cd hacks ; list_files install ) > $dd/extras.files
139 ( cd hacks/glx ; list_files install ) > $dd/gl-extras.files
140 ( cd driver ; list_files install ) > $dd/base.files
141 #( cd po ; list_files install ) >> $dd/base.files
144 cat %{name}.lang >> $dd/base.files
147 # Make sure all files are readable by all, and writable only by owner.
149 chmod -R a+r,u+w,og-w ${RPM_BUILD_ROOT}
152 rm -rf ${RPM_BUILD_ROOT}
155 # This part runs on the end user's system, when the RPM is installed.
157 pids=`/sbin/pidof xscreensaver`
158 if [ -n "$pids" ]; then
159 echo "sending SIGHUP to running xscreensaver ($pids)..." >&2
163 %files -f base.files base
164 %defattr(-,root,root)
166 %files -f extras.files extras
167 %defattr(-,root,root)
169 %files -f gl-extras.files gl-extras
170 %defattr(-,root,root)