From http://www.jwz.org/xscreensaver/xscreensaver-5.37.tar.gz
[xscreensaver] / xscreensaver.spec
1 %define name xscreensaver
2 %define version 5.37
3
4 Summary:        X screen saver and locker
5 Name:           %{name}
6 Version:        %{version}
7 Release:        1
8 Epoch:          1
9 License:        BSD
10 Group:          Amusements/Graphics
11 URL:            https://www.jwz.org/xscreensaver/
12 Source0:        https://www.jwz.org/xscreensaver/xscreensaver-%{version}.tar.gz
13 Vendor:         Jamie Zawinski <jwz@jwz.org>
14 Buildroot:      %{_tmppath}/%{name}-root
15
16 %package base
17 Summary: A minimal installation of xscreensaver.
18 Summary(fr): Une installation minimale de xscreensaver.
19 Group: Amusements/Graphics
20 BuildRequires:  bc
21 BuildRequires:  gettext
22 BuildRequires:  pam-devel
23 BuildRequires:  gtk2-devel
24 BuildRequires:  desktop-file-utils
25 # Red Hat (pre-FC5):
26 #BuildRequires: xorg-x11-devel
27 #BuildRequires: libglade2-devel
28 # Red Hat 5, CentOS5, FC5, and up:
29 BuildRequires:  xorg-x11-proto-devel
30 BuildRequires:  libglade2-devel
31 # Mandrake:
32 #BuildRequires: libxorg-x11-devel
33 #BuildRequires: libglade2.0_0-devel
34 Requires: SysVinit
35 Requires: /etc/pam.d/system-auth
36 Requires: htmlview
37 Requires: desktop-backgrounds-basic
38 Provides: xscreensaver
39 Provides: xscreensaver-base
40 Obsoletes: xscreensaver
41
42 %package extras
43 Summary: An enhanced set of screensavers.
44 Summary(fr): Un jeu étendu d'économiseurs d'écran.
45 Group: Amusements/Graphics
46 Requires: xscreensaver-base
47
48 %package gl-extras
49 Summary: An enhanced set of screensavers that require OpenGL.
50 Summary(fr): Un jeu étendu d'économiseurs d'écran qui nécessitent OpenGL.
51 Group: Amusements/Graphics
52 Requires: xscreensaver-base
53 Obsoletes: xscreensaver-gl
54
55 %description
56 A modular screen saver and locker for the X Window System.
57 More than 200 display modes are included in this package.
58
59 %description -l fr
60 Un économiseur d'écran modulaire pour le système X Window.
61 Plus de 200 modes d'affichages sont inclus dans ce paquet.
62
63 %description base
64 A modular screen saver and locker for the X Window System.
65 This package contains the bare minimum needed to blank and
66 lock your screen.  The graphical display modes are the
67 "xscreensaver-extras" and "xscreensaver-gl-extras" packages.
68
69 %description -l fr base 
70 Un économiseur d'écran modulaire pour le système X Window.
71 Ce paquet contient le minimum vital pour éteindre et verouiller
72 votre écran. Les modes d'affichages graphiques sont inclus
73 dans les paquets "xscreensaver-extras" et "xscreensaver-gl-extras".
74
75 %description extras
76 A modular screen saver and locker for the X Window System.
77 This package contains a variety of graphical screen savers for
78 your mind-numbing, ambition-eroding, time-wasting, hypnotized
79 viewing pleasure.
80
81 %description -l fr extras
82 Un économiseur d'écran modulaire pour le système X Window.
83 Ce paquet contient une pléthore d'économiseurs d'écran graphiques
84 pour votre plaisir des yeux.
85
86 %description gl-extras
87 A modular screen saver and locker for the X Window System.
88 This package contains a variety of OpenGL-based (3D) screen
89 savers for your mind-numbing, ambition-eroding, time-wasting,
90 hypnotized viewing pleasure.
91
92 %description -l fr gl-extras
93 Un économiseur d'écran modulaire pour le système X Window.
94 Ce paquet contient une pléthore d'économiseurs d'écran basés sur OpenGL (3D)
95 pour votre plaisir des yeux.
96
97 %prep
98 %setup -q
99
100 if [ -x %{_datadir}/libtool/config.guess ]; then
101   # use system-wide copy
102   cp -p %{_datadir}/libtool/config.{sub,guess} .
103 fi
104
105 %build
106 archdir=`./config.guess`
107 mkdir $archdir
108 cd $archdir
109
110 export CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}"
111
112 CONFIG_OPTS="--prefix=/usr --with-pam --without-shadow --without-kerberos"
113
114 # Red Hat doesn't like this:
115 CONFIG_OPTS="$CONFIG_OPTS --with-setuid-hacks"
116
117 # This is flaky:
118 # CONFIG_OPTS="$CONFIG_OPTS --with-login-manager"
119
120 ln -s ../configure .
121 %configure $CONFIG_OPTS
122 rm -f configure
123
124 make
125
126 %install
127 archdir=`./config.guess`
128 cd $archdir
129
130 rm -rf ${RPM_BUILD_ROOT}
131
132 # We have to make sure these directories exist,
133 # or nothing will be installed into them.
134 #
135 mkdir -p $RPM_BUILD_ROOT%{_bindir}                      \
136          $RPM_BUILD_ROOT%{_datadir}/xscreensaver        \
137          $RPM_BUILD_ROOT%{_libexecdir}/xscreensaver     \
138          $RPM_BUILD_ROOT%{_mandir}/man1/xscreensaver    \
139          $RPM_BUILD_ROOT/etc/pam.d
140
141 make install_prefix=$RPM_BUILD_ROOT install
142
143 desktop-file-install --vendor gnome --delete-original                         \
144   --dir $RPM_BUILD_ROOT%{_datadir}/applications                               \
145   $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
146
147 # This function prints a list of things that get installed.
148 # It does this by parsing the output of a dummy run of "make install".
149 #
150 list_files() {
151   make -s install_prefix=${RPM_BUILD_ROOT} INSTALL=true "$@"    \
152    | sed -n -e 's@.* \(/[^ ]*\)$@\1@p'                          \
153    | sed    -e "s@^${RPM_BUILD_ROOT}@@"                         \
154             -e "s@/[a-z][a-z]*/\.\./@/@"                        \
155    | sed    -e 's@\(.*/man/.*\)@\1\*@'                          \
156    | sed    -e 's@\(.*/app-defaults/\)@%config \1@'             \
157             -e 's@\(.*/pam\.d/\)@%config(missingok) \1@'        \
158    | sort
159 }
160
161 # Generate three lists of files for the three packages.
162 #
163 dd=%{_builddir}/%{name}-%{version}
164 (  cd hacks     ; list_files install ) >  $dd/extras.files
165 (  cd hacks/glx ; list_files install ) >  $dd/gl-extras.files
166 (  cd driver    ; list_files install ) >  $dd/base.files
167 #( cd po        ; list_files install ) >> $dd/base.files
168
169 %find_lang %{name}
170 cat %{name}.lang >> $dd/base.files
171
172
173 # Make sure all files are readable by all, and writable only by owner.
174 #
175 chmod -R a+r,u+w,og-w ${RPM_BUILD_ROOT}
176
177 %clean
178 rm -rf ${RPM_BUILD_ROOT}
179
180 %post base
181 # This part runs on the end user's system, when the RPM is installed.
182
183 # This will cause the screen to unlock, which annoys people.  So, nevermind:
184 # people will just have to remember to re-launch it themselves, like they
185 # have to do with any other daemon they've upgraded.
186 #
187 #pids=`/sbin/pidof xscreensaver`
188 #if [ -n "$pids" ]; then
189 #  echo "sending SIGHUP to running xscreensaver ($pids)..." >&2
190 #  kill -HUP $pids
191 #fi
192
193 %files -f base.files base
194 %defattr(-,root,root)
195
196 %files -f extras.files extras
197 %defattr(-,root,root)
198
199 %files -f gl-extras.files gl-extras
200 %defattr(-,root,root)
201
202 %changelog
203 * Fri Nov  4  2005 Eric Lassauge <lassauge@users.sf.net>
204 - Updated french translations