http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.03.tar.gz
[xscreensaver] / xscreensaver.spec
index 1ffda636d1715e8e55e2816b4c7c3be2787568ce..982686185cc9b6a01189cca116bd1bf30805332b 100644 (file)
@@ -1,5 +1,5 @@
 %define        name            xscreensaver
-%define        version         4.00
+%define        version         4.03
 %define        release         1
 %define        serial          1
 %define        x11_prefix      /usr/X11R6
@@ -29,11 +29,15 @@ Vendor:             Jamie Zawinski <jwz@jwz.org>
 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 120 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.}
 
@@ -73,15 +77,19 @@ 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=%{x11_prefix} \
-             --with-setuid-hacks \
-             $RPMOPTS
-
+ ../configure --prefix=%{x11_prefix} \
+              --with-setuid-hacks \
+              $RPMOPTS
 make
 
 %install
 
+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/).
@@ -100,6 +108,7 @@ mkdir -p $RPM_BUILD_ROOT$KDEDIR/bin
 #
 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
 
+cd $archdir
 make  install_prefix=$RPM_BUILD_ROOT \
       AD_DIR=%{x11_prefix}/lib/X11/app-defaults \
       GNOME_BINDIR=%{gnome_prefix}/bin \
@@ -144,6 +153,15 @@ install -m 4755 driver/xscreensaver $RPM_BUILD_ROOT%{x11_prefix}/bin
 #
 chmod -R a+r,u+w,og-w $RPM_BUILD_ROOT
 
+%post
+# This part runs on the end user's system, when the RPM is installed.
+
+pids=`pidof xscreensaver`
+if [ -n "$pids" ]; then
+  echo "sending SIGHUP to running xscreensaver ($pids)..." >&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
@@ -166,6 +184,8 @@ if [ -d $RPM_BUILD_ROOT-gl ]; then rm -r $RPM_BUILD_ROOT-gl ; fi
 %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 exes-gl gl}