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