X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=xscreensaver.spec;h=6660f7de064d80b844901e80c1dca68a6991268a;hp=8fab8fac83ca2e17ddd3bfc30eb8700ea7c82980;hb=ffd8c0873576a9e3065696a624dce6b766b77062;hpb=c596d1306f5f92f7eab76224d3b049980a14adcb diff --git a/xscreensaver.spec b/xscreensaver.spec index 8fab8fac..6660f7de 100644 --- a/xscreensaver.spec +++ b/xscreensaver.spec @@ -1,110 +1,191 @@ -Name: xscreensaver -Summary: X screen saver and locker -Vendor: Jamie Zawinski -Version: 3.19 -Release: 1 -URL: http://www.jwz.org/xscreensaver/ -Source: xscreensaver-%{version}.tar.gz -Copyright: BSD -Group: X11/Utilities -Buildroot: /var/tmp/xscreensaver-root +%define name xscreensaver +%define version 4.18 +%define release 1 +%define epoch 1 +%define x11_prefix /usr/X11R6 +%define gnome_prefix /usr +%define kde_prefix /usr +%define gnome_datadir %{gnome_prefix}/share + +# By default, builds the basic, non-GL package. +# To build both the basic and GL-add-on packages: +# rpm --define "USE_GL yes" ... +# or uncomment the following line. +# %define USE_GL yes + +Summary: X screen saver and locker +Summary(fr): Economiseur d'écran et verrouillage de terminaux X +Name: %{name} +Version: %{version} +Release: %{release} +Epoch: %{epoch} +Group: Amusements/Graphics +License: BSD +URL: http://www.jwz.org/xscreensaver/ +Vendor: Jamie Zawinski +Source: %{name}-%{version}.tar.gz +Buildroot: %{_tmppath}/%{name}-%{version}-root + +# This package really should be made to depend on +# control-center >= 1.4.0.2 -OR- control-center >= 1.5.12 +# but there's no way to express that. %description A modular screen saver and locker for the X Window System. Highly customizable: allows the use of any program that can draw on the root window as a display mode. -More than 100 display modes are included in this package. +More than 180 display modes are included in this package. +%{?USE_GL:See also the xscreensaver-gl package, which} +%{?USE_GL:includes optional OpenGL display modes.} + +%description -l fr +Un économiseur d'écran et verrouillage modulaire pour X-Window. +Hautement configurable: permet l'utilisation de n'importe quel programme +qui peut dessiner dans la fenêtre root. +Plus de 180 modes d'affichage sont inclus dans ce paquet. +%{?USE_GL:Voir aussi le paquet xscreensaver-gl, qui inclut} +%{?USE_GL:des modules optionnels OpenGL.} + +%{?USE_GL:%package gl} +%{?USE_GL:Group: Amusements/Graphics} +%{?USE_GL:Requires: xscreensaver = %{epoch}:%{version}-%{release}} +%{?USE_GL:Summary: A set of GL screensavers} +%{?USE_GL:Summary(fr): Un ensemble d'économiseurs d'écran OpenGL} +%{?USE_GL:%description gl} +%{?USE_GL:The xscreensaver-gl package contains even more screensavers for your} +%{?USE_GL:mind-numbing, ambition-eroding, time-wasting, hypnotized viewing} +%{?USE_GL:pleasure. These screensavers require OpenGL or Mesa support.} +%{?USE_GL: } +%{?USE_GL:Install the xscreensaver-gl package if you need more screensavers} +%{?USE_GL:for use with the X Window System and you have OpenGL or Mesa} +%{?USE_GL:installed.} +%{?USE_GL:%description -l fr gl} +%{?USE_GL:Le paquet xscreensaver-gl contient encore plus d'économiseurs} +%{?USE_GL:d'écran pour votre plaisir visuel.} +%{?USE_GL: } +%{?USE_GL:Ces économiseurs d'écran nécessitent OpenGL ou Mesa.} +%{?USE_GL:Installez le paquet xscreensaver-gl si vous désirez plus} +%{?USE_GL:d'économiseur d'écran et que vous avez OpenGL ou Mesa installé.} %prep - %setup -q %build +RPMOPTS="" -./configure --prefix=/usr/X11R6 \ - --enable-subdir=/usr/X11R6/lib/xscreensaver -make all +# On Solaris, build without PAM and with Shadow. +# On other systems, build with PAM and without Shadow. +# +%ifos solaris + RPMOPTS="$RPMOPTS --without-pam" +%else + RPMOPTS="$RPMOPTS --with-pam --without-shadow" +%endif + +%{?USE_GL:RPMOPTS="$RPMOPTS --with-gl"} +%{!?USE_GL:RPMOPTS="$RPMOPTS --without-gl"} + +archdir=`./config.guess` +mkdir $archdir +cd $archdir +CFLAGS="$RPM_OPT_FLAGS" \ + ../configure --prefix=%{x11_prefix} \ + --with-setuid-hacks \ + $RPMOPTS +make %install -# This is the only directory that "make install" won't make as needed -# (since Linux uses /etc/pam.d/* and Solaris uses /etc/pam.conf). +archdir=`./config.guess` + +# We have to make sure these directories exist, +# or nothing will be installed into them. # +export KDEDIR=%{kde_prefix} +mkdir -p $RPM_BUILD_ROOT$KDEDIR/bin +mkdir -p $RPM_BUILD_ROOT%{gnome_datadir} mkdir -p $RPM_BUILD_ROOT/etc/pam.d -make prefix=$RPM_BUILD_ROOT/usr/X11R6 \ - AD_DIR=$RPM_BUILD_ROOT/usr/X11R6/lib/X11/app-defaults \ - HACKDIR=$RPM_BUILD_ROOT/usr/X11R6/lib/xscreensaver \ - PAM_DIR=$RPM_BUILD_ROOT/etc/pam.d \ - install-strip +cd $archdir +make install_prefix=$RPM_BUILD_ROOT \ + AD_DIR=%{x11_prefix}/lib/X11/app-defaults \ + GNOME_BINDIR=%{gnome_prefix}/bin \ + install-strip + +# This function prints a list of things that get installed. +# It does this by parsing the output of a dummy run of "make install". +# +list_files() { + make -s install_prefix=$RPM_BUILD_ROOT INSTALL=true \ + GNOME_BINDIR=%{gnome_prefix}/bin \ + "$@" | + sed -n -e 's@.* \(/[^ ]*\)$@\1@p' | + sed -e "s@^$RPM_BUILD_ROOT@@" \ + -e "s@/[a-z][a-z]*/\.\./@/@" | + sed -e 's@\(.*/man/.*\)@\1\*@' | + sort +} + +# Collect the names of the non-GL executables and scripts... +# (Including the names of all of the Gnome, KDE, and L10N-related files, +# whereever they might have gotten installed...) +# For the translation catalogs, prepend an appropriate %lang(..) tag. +# +( cd hacks ; list_files install ; \ + cd ../driver; list_files install-program install-scripts \ + install-gnome install-kde ; \ + ( cd ../po; list_files install | grep '\.' \ + | sed 's@^\(.*/\([^/]*\)/LC.*\)$@%lang(\2) \1@' ) \ +) > $RPM_BUILD_DIR/xscreensaver-%{version}/exes-non-gl + + +# Collect the names of the GL-only executables... +# +( cd hacks/glx ; list_files install ) \ + | grep -v man1/xscreensaver-gl-helper \ + > $RPM_BUILD_DIR/xscreensaver-%{version}/exes-gl # This line is redundant, except that it causes the "xscreensaver" # executable to be installed unstripped (while all others are stripped.) # You should install it this way so that jwz gets useful bug reports. # -install -m 4755 driver/xscreensaver $RPM_BUILD_ROOT/usr/X11R6/bin +install -m 4755 driver/xscreensaver $RPM_BUILD_ROOT%{x11_prefix}/bin # Even if we weren't compiled with PAM support, make sure to include # the PAM module file in the RPM anyway, just in case. # -( cd driver; make PAM_DIR=$RPM_BUILD_ROOT/etc/pam.d install-pam ) - -# If we built multiple versions of xscreensaver-demo (because multiple -# toolkits were available) then install them all. -# -( cd driver; - exes=`echo xscreensaver-demo-*` - count=`echo $exes | wc -w` - if [ $count -gt 1 ]; then - for exe in $exes; do - install -c -s $exe $RPM_BUILD_ROOT/usr/X11R6/bin - done - cd $RPM_BUILD_ROOT/usr/X11R6/bin - if [ -x xscreensaver-demo-Xaw3d ]; then target=Xaw3d; fi - if [ -x xscreensaver-demo-Xaw ]; then target=Xaw; fi - if [ -x xscreensaver-demo-Gtk ]; then target=Gtk; fi - if [ -x xscreensaver-demo-Xm ]; then target=Xm; fi - rm -f xscreensaver-demo - ln -s xscreensaver-demo-$target xscreensaver-demo - fi - ) - - -# This is for wmconfig, a tool that generates init files for window managers. -# -mkdir -p $RPM_BUILD_ROOT/etc/X11/wmconfig -cat > $RPM_BUILD_ROOT/etc/X11/wmconfig/xscreensaver < "$RPM_BUILD_ROOT/usr/share/apps/Amusements/Screen Savers/xscreensaver.desktop" <&2 + kill -HUP $pids +fi + %clean -rm -rf $RPM_BUILD_ROOT +if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT ; fi +if [ -d $RPM_BUILD_ROOT-gl ]; then rm -r $RPM_BUILD_ROOT-gl ; fi -%files +# Files for the "xscreensaver" package: +# +%files -f exes-non-gl %defattr(-,root,root) -%doc README README.debugging - /usr/X11R6/bin/* - /usr/X11R6/lib/xscreensaver/* -%config /usr/X11R6/lib/X11/app-defaults/* - /usr/X11R6/man/man1/* - /etc/pam.d/* -%config(missingok) /etc/X11/wmconfig/* -%config(missingok) "/usr/share/apps/Amusements/Screen Savers/*" +%doc README README.debugging +%dir %{x11_prefix}/lib/xscreensaver +%config %{x11_prefix}/lib/X11/app-defaults/* + %{x11_prefix}/man/man1/xscreensaver* +%config /etc/pam.d/* + +# Files for the "xscreensaver-gl" package: +# +%{?USE_GL:%files -f exes-gl gl} +%{?USE_GL:%defattr(-,root,root)}