X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xscreensaver.spec;h=982686185cc9b6a01189cca116bd1bf30805332b;hb=3f9592851ce4ed76a9979bfdd6ec7dc5c457e183;hp=b8e4dfb0d1da8a9cd44a2fc102fcafd346f7a5db;hpb=06e9a7886a77cad92f9ddbc169d6d199a4d8b76d;p=xscreensaver diff --git a/xscreensaver.spec b/xscreensaver.spec index b8e4dfb0..98268618 100644 --- a/xscreensaver.spec +++ b/xscreensaver.spec @@ -1,12 +1,21 @@ -%define name xscreensaver -%define version 3.23 -%define release 1 -%define serial 1 -%define prefix /usr/X11R6 +%define name xscreensaver +%define version 4.03 +%define release 1 +%define serial 1 +%define x11_prefix /usr/X11R6 +%define gnome_prefix /usr +%define kde_prefix /usr + +%define gnome_datadir %{gnome_prefix}/share +%define gnome_ccdir %{gnome_datadir}/control-center/Desktop +%define gnome_paneldir %{gnome_datadir}/gnome/apps/Settings/Desktop +%define gnome_icondir %{gnome_datadir}/pixmaps # 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 Name: %{name} @@ -18,13 +27,17 @@ Copyright: BSD URL: http://www.jwz.org/xscreensaver Vendor: Jamie Zawinski Source: %{name}-%{version}.tar.gz -Buildroot: /var/tmp/%{name}-%{version}-root +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 140 display modes are included in this package. %{?USE_GL:See also the xscreensaver-gl package, which} %{?USE_GL:includes optional OpenGL display modes.} @@ -64,52 +77,71 @@ RPMOPTS="" %{?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=%{prefix} \ - --enable-subdir=../lib/xscreensaver \ - $RPMOPTS - + ../configure --prefix=%{x11_prefix} \ + --with-setuid-hacks \ + $RPMOPTS make %install -# This is a directory that "make install" won't make as needed -# (since Linux uses /etc/pam.d/* and Solaris uses /etc/pam.conf). +archdir=`./config.guess` + +# Most xscreensaver executables go in the X bin directory (/usr/X11R6/bin/) +# but some of them (e.g., the control panel capplet) go in the GNOME bin +# directory instead (/usr/bin/). # -mkdir -p $RPM_BUILD_ROOT/etc/pam.d +mkdir -p $RPM_BUILD_ROOT%{gnome_prefix}/bin +mkdir -p $RPM_BUILD_ROOT%{gnome_ccdir} +mkdir -p $RPM_BUILD_ROOT%{gnome_paneldir} -# This is another (since "make install" doesn't try to install -# the xscreensaver.kss file unless $KDEDIR is set.) +# Likewise for KDE: the .kss file goes in the KDE bin directory (/usr/bin/). # -if [ -z "$KDEDIR" ]; then export KDEDIR=/usr; fi +export KDEDIR=%{kde_prefix} mkdir -p $RPM_BUILD_ROOT$KDEDIR/bin +# This is a directory that "make install" won't make as needed +# (since Linux uses /etc/pam.d/* and Solaris uses /etc/pam.conf). +# +mkdir -p $RPM_BUILD_ROOT/etc/pam.d + +cd $archdir make install_prefix=$RPM_BUILD_ROOT \ - AD_DIR=%{prefix}/lib/X11/app-defaults \ + AD_DIR=%{x11_prefix}/lib/X11/app-defaults \ + GNOME_BINDIR=%{gnome_prefix}/bin \ install-strip -# Make a pair of lists, of the GL and non-GL hacks. +# Make a pair of lists, of the GL and non-GL executables. # Do this by parsing the output of a dummy run of "make install" -# in the hacks/ and hacks/glx/ directories. +# in the driver/, hacks/ and hacks/glx/ directories. # list_files() { - make -s install_prefix=$RPM_BUILD_ROOT INSTALL=true install | + 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@/bin/..@@" | + -e "s@/bin/\.\./@/@" | + sed -e 's@\(.*/man/.*\)@\1\*@' | sort } -( cd hacks ; list_files > $RPM_BUILD_DIR/xscreensaver-%{version}/hacks-non-gl ) -( cd hacks/glx ; list_files > $RPM_BUILD_DIR/xscreensaver-%{version}/hacks-gl ) - +( cd hacks ; list_files install ; \ + cd ../driver; list_files install-program install-scripts ) \ + > $RPM_BUILD_DIR/xscreensaver-%{version}/exes-non-gl +( 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%{prefix}/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. @@ -117,49 +149,43 @@ install -m 4755 driver/xscreensaver $RPM_BUILD_ROOT%{prefix}/bin ( cd driver ; make install_prefix=$RPM_BUILD_ROOT PAM_DIR=/etc/pam.d install-pam ) -# 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 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 -f hacks-non-gl +%files -f exes-non-gl %defattr(-,root,root) # Files for the "xscreensaver" package: # %doc README README.debugging - %{prefix}/bin/* -%dir %{prefix}/lib/xscreensaver -%config %{prefix}/lib/X11/app-defaults/* - %{prefix}/man/man1/xscreensaver* +%dir %{x11_prefix}/lib/xscreensaver +%config %{x11_prefix}/lib/X11/app-defaults/* + %{x11_prefix}/man/man1/xscreensaver* /etc/pam.d/* -%config(missingok) /usr/bin/*.kss -%config(missingok) /etc/X11/wmconfig/* -%config(missingok) "/usr/share/apps/Amusements/Screen Savers/*" + +%config(missingok) %{kde_prefix}/bin/*.kss + +%config(missingok) %{gnome_prefix}/bin/*-capplet +%config(missingok) %{gnome_ccdir}/*.desktop +%config(missingok) %{gnome_paneldir}/*.desktop +%config(missingok) %{gnome_icondir}/* + +%config(missingok) %{gnome_prefix}/share/locale/ # Files for the "xscreensaver-gl" package: # -%{?USE_GL:%files -f hacks-gl gl} +%{?USE_GL:%files -f exes-gl gl}