rss-glx/rss-glx.spec
2008-05-29 09:55:19 +00:00

443 lines
14 KiB
RPMSpec

%if 0%{?fedora}
%if %{fedora} <= 4
%bcond_with modular_x
%bcond_with gss
%define _gssconfigdir %{nil}%{?gssconfigdir}
%else
%bcond_without modular_x
%bcond_without gss
%if %{fedora} <= 5
%define _gssconfigdir %{!?gssconfigdir:%{_datadir}/gnome-screensaver/themes}%{?gssconfigdir}
%else
%define _gssconfigdir %{!?gssconfigdir:%{_datadir}/applications/screensavers}%{?gssconfigdir}
%endif
%if %{fedora} >= 7
%bcond_without modular_xss
%else
%bcond_with modular_xss
%endif
%if %{fedora} >= 8
# KDE4
%bcond_without kde4
%else
# KDE3
%bcond_with kde4
%endif
%endif
%else
%bcond_without modular_x
%bcond_without modular_xss
%bcond_without gss
%define _gssconfigdir %{!?gssconfigdir:%{_datadir}/applications/screensavers}%{?gssconfigdir}
%endif
%define kdessconfigdir %{?with_kde4:%{_datadir}/kde4/services/ScreenSavers}%{!?with_kde4:%{_datadir}/applnk/System/ScreenSavers}
%define xssconfigdir %{_datadir}/xscreensaver/config
%define xssexthacksconfdir %{_datadir}/xscreensaver/hacks.conf.d
%define xssbindir %{_libexecdir}/xscreensaver
%define gssbindir %{_libexecdir}/gnome-screensaver
%bcond_with matrixview
%define patchext %{nil}%{!?with_matrixview:.p}
Summary: Really Slick Screensavers
Name: rss-glx
Version: 0.8.1%{patchext}
Release: 20%{?dist}
License: GPLv2
Group: Amusements/Graphics
URL: http://rss-glx.sourceforge.net/
# We ship a tarball with one questionable hack patched out.
# The original URL is the following without %%patchext:
# Source0: http://dl.sourceforge.net/sourceforge/rss-glx/rss-glx_%{version}.tar.bz2
Source0: rss-glx_%{version}.tar.bz2
Source1: README.fedora
Source2: rss-glx-rm-matrixview.sh
Source3: rss-glx-0.8.1-0.8.1.p.diff
Patch0: rss-glx-0.8.1-freealut.patch
Patch1: rss-glx-0.8.1-flags.patch
Patch2: rss-glx-0.8.1-gcc43-buildfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: libGL-devel
BuildRequires: libGLU-devel
%if %{with matrixview}
BuildRequires: ImageMagick-devel >= 6.2.5.4
%endif
%if %{with modular_x}
BuildRequires: libICE-devel
BuildRequires: libSM-devel
BuildRequires: libX11-devel
BuildRequires: libXt-devel
%else
BuildRequires: xorg-x11-devel
%endif
BuildRequires: bzip2-devel
BuildRequires: openal-devel
BuildRequires: freealut-devel
BuildRequires: autoconf
BuildRequires: libtool
BuildRequires: gawk
BuildRequires: sed
%description
A port of the Really Slick Screensavers to GLX. Provides several visually
impressive and graphically intensive screensavers.
Note that this package contains only the display hacks themselves; you will
need to install the appropriate subpackage for your desktop environment in
order to use them as screensavers.
%package xscreensaver
Summary: Really Slick Screensavers
Group: Amusements/Graphics
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
%if %{with modular_xss}
Requires(post): xscreensaver-base >= 1:5.03-3
Requires(postun): xscreensaver-base >= 1:5.03-3
%else
Requires: xscreensaver-base < 1:5.03-3
%endif
%if 0%{?fedora} >= 7
Requires: xscreensaver-gl-base
%endif
%description xscreensaver
A port of the Really Slick Screensavers to GLX. Provides several visually
impressive and graphically intensive screensavers.
This package contains files needed to use the hacks with xscreensaver.
%if %{with gss}
%package gnome-screensaver
Summary: Really Slick Screensavers
Group: Amusements/Graphics
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: gnome-screensaver
%description gnome-screensaver
A port of the Really Slick Screensavers to GLX. Provides several visually
impressive and graphically intensive screensavers.
This package contains files needed to use the hacks with gnome-screensaver.
%endif
%package kde
Summary: Really Slick Screensavers
Group: Amusements/Graphics
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{name}-xscreensaver = %{?epoch:%{epoch}:}%{version}-%{release}
%if 0%{?fedora}%{?rhel} > 0 && 0%{?fedora} <= 6 && 0%{?rhel} <= 5
Requires: kdeartwork-extras
%else
Requires: kdeartwork-kxs
%endif
%description kde
A port of the Really Slick Screensavers to GLX. Provides several visually
impressive and graphically intensive screensavers.
This package contains files needed to use the hacks with KDE.
%prep
cat << EOF
Build settings:
%if %{with modular_x}
- with modular X
%else
- with monolithic X
%endif
%if %{with gss}
- with gnome-screensaver support,
theme directory: %{_gssconfigdir}
%else
- without gnome-screensaver support
%endif
%if %{with matrixview}
- with matrixview hack
%else
- without matrixview hack
%endif
%if %{with modular_xss}
- with modular xscreensaver support
%else
- without modular xscreensaver support
%endif
%if %{with kde4}
- with KDE4 support in: %kdessconfigdir
%else
- with KDE3 support in: %kdessconfigdir
%endif
EOF
%setup -q -n rss-glx_%{version}
%patch0 -p1 -b .freealut
%patch1 -p1 -b .flags
%patch2 -p1 -b .gcc43
# work around BZ #189928
for f in `find . -type l` ; do
cp -p ${f} ${f}_
unlink ${f}
mv ${f}_ $f
done
%build
autoconf
%configure \
--with-configdir=%{xssconfigdir} \
--with-kdessconfigdir=%{kdessconfigdir} \
--program-prefix=rss-glx-
make %{?_smp_mflags}
%install
generate_fix_desktop_files_links () {
local line name trycmd cmd desc
while read line; do
%if %{with gss}
# generate GNOME screensaver desktop files
eval $(echo "$line" | awk -F§ '{print "name=\"" $1 "\"; cmd=\"rss-glx-" $2 "\"; desc=\"" $3 "\""}')
trycmd="${cmd%%%% *}"
origtrycmd="${trycmd#rss-glx-}"
cat << EOF > %{buildroot}%{_gssconfigdir}/${cmd}.desktop
[Desktop Entry]
Encoding=UTF-8
Name=${name}
Comment=${desc}
TryExec=${trycmd}
Exec=${cmd} -r
StartupNotify=false
Terminal=false
Type=Application
Categories=GNOME;Screensaver;
EOF
ln -snf "%{_bindir}/${trycmd}" "%{buildroot}%{gssbindir}/${trycmd}"
%endif
# fix KDE screensaver desktop files
pushd "%{buildroot}%{kdessconfigdir}" >& /dev/null
if [ ! -f "${trycmd}.desktop" ]; then
awk '{if ($0 ~ "^Actions=") { print "Actions=InWindow;Root;Setup;"; print "X-KDE-Category=Really Slick Screensavers"; print "X-KDE-Type=OpenGL"; } else { print; }}' < "${origtrycmd}.desktop" | sed 's@^Exec=\(.*\)'"$origtrycmd"'\(.*\)$@Exec=\1'"$trycmd"'\2@g' > "${trycmd}.desktop"
rm -f "${origtrycmd}.desktop"
fi
popd >& /dev/null
# external hacks description and symlinks for XScreenSaver
cat << EOF >> %{buildroot}%{xssexthacksconfdir}/rss-glx.conf
GL: "${name}" \\
${cmd} -r \\n\\
EOF
ln -snf "%{_bindir}/${trycmd}" "%{buildroot}%{xssbindir}/${trycmd}"
done
}
rm -rf %buildroot
install -m 0644 "%SOURCE1" "%SOURCE2" "%SOURCE3" .
make DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_libdir}/lib*.{,l}a %{buildroot}%{_bindir}/rss-glx_install.pl
%if %{with gss}
mkdir -p %{buildroot}%{_gssconfigdir}
mkdir -p %{buildroot}%{gssbindir}
mkdir -p %{buildroot}%{xssbindir}
mkdir -p %{buildroot}%{xssexthacksconfdir}
%endif
cat << EOF | generate_fix_desktop_files_links
BioF§biof§This is an attempt to recreate some of the work of William Latham.
Busy Spheres§busyspheres§Spheres made of dancing particles.
Colorfire§colorfire§Burning colors.
Cyclone§cyclone§A cyclone made of particles.
Euphoria§euphoria§Psychedelic shapes.
Fieldlines§fieldlines§A simulation of the electric field lines between charged particles.
Flocks§flocks§Flocks of birds.
Flux§flux§If you know anything about strange attractors, you might recognize the patterns created by this screensaver.
Helios§helios§Throw together some attraction/repulsion particle effects and some smooth implicit surfaces and this is what you get.
Hufo's Smoke§hufo_smoke§Smoke effect.
Hufo's Tunnel§hufo_tunnel§Inside a tunnel.
Hyperspace§hyperspace§Hyperspace.
Lattice§lattice§Fly through an endless world of linked rings.
%if %{with matrixview}
MatrixView§matrixview§The Matrix.
%endif
Plasma§plasma§Probably the second most psychedelic screensaver in existence.
Skyrocket (silent)§skyrocket -v 0§The most full-blown fireworks screensaver ever. It has bright lights, smoke trails, clouds that are illuminated by the explosions, sound effects, and plenty of other eye candy. Silent version.
Skyrocket§skyrocket§The most full-blown fireworks screensaver ever. It has bright lights, smoke trails, clouds that are illuminated by the explosions, sound effects, and plenty of other eye candy. With sound.
Solarwinds§solarwinds§This is a very mesmerizing particle effects saver.
SpirographX§spirographx§Spirograph-like screensaver.
Sundancer2§sundancer2§Rotating stack of quads.
EOF
%clean
rm -rf %buildroot
%if %{with modular_xss}
%post xscreensaver
if [ -x %{_sbindir}/update-xscreensaver-hacks ]; then
%{_sbindir}/update-xscreensaver-hacks
fi
%postun xscreensaver
if [ -x %{_sbindir}/update-xscreensaver-hacks ]; then
%{_sbindir}/update-xscreensaver-hacks || :
fi
%endif
%files
%defattr(-, root, root)
%doc ChangeLog COPYING INSTALL README
%doc README.fedora rss-glx-rm-matrixview.sh rss-glx-0.8.1-0.8.1.p.diff
%{_bindir}/*
%{_mandir}/*/*
%files xscreensaver
%defattr(-, root, root)
# xscreensaver-base provides %{xssexthacksconfdir}
%config(noreplace) %{xssexthacksconfdir}/rss-glx.conf
%{xssconfigdir}/*.xml
%dir %{xssbindir}
%{xssbindir}/*
%if %{with gss}
%files gnome-screensaver
%defattr(-, root, root)
%dir %{_gssconfigdir}
%{_gssconfigdir}/*.desktop
%dir %{gssbindir}
%{gssbindir}/*
%endif
%files kde
%defattr(-, root, root)
%dir %{kdessconfigdir}
%{kdessconfigdir}/*.desktop
%changelog
* Thu May 29 2008 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-20
- use %%bcond, %%with macros for consistency
- don't use quotes around %%fedora macro to make it work with Fedora 10
- use correct binary names for KDE (#448844)
* Wed Apr 02 2008 Rex Dieter <rdieter@fedoraproject.org> 0.8.1.p-19
- -kde: drop Requires: kdebase (kdeartwork dep is enough)
- fix %%kdessconfigdir for kde4
* Fri Jan 31 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.8.1.p-18
- Fix build with gcc43
* Mon Nov 05 2007 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-17
- make screensavers show up in screensaver preferences again (#365991)
* Tue Oct 30 2007 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-16
- don't show screensaver hacks in main menu (#357451)
* Fri Oct 19 2007 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-15
- let -xscreensaver require xscreensaver-gl-base (#336331)
* Tue Oct 02 2007 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-14
- prefix xscreensaver symlinks with "rss-glx-" as well (#318611)
* Tue Oct 02 2007 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-13
- prefix binaries with "rss-glx-" (#250180)
* Mon Oct 01 2007 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-12
- don't ship README.xscreensaver (#200881)
* Sat Sep 15 2007 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-11
- enable modular xscreensaver support for Fedora 7 and later (#200881)
- include %%post/%%postun scripts only with modular xscreensaver support
* Fri Sep 14 2007 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-10
- replace requirement on %{_bindir}/kxsconfig by kdeartwork-kxe (Fedora >= 7,
RHEL >= 6), kdeartwork-extras (<= Fedora 6, RHEL 5)
- license is GPLv2
- run %{_sbindir}/update-xscreensaver-hacks in %%post, %%postun, require
xscreensaver-base >= 5.03-3 for that
- don't reference upstream URL for source tarball as we ship a modified one
* Mon Sep 03 2007 Nils Philippsen <nphilipp@redhat.com>
- implement revamped modular xscreensaver configuration (#200881)
- require post/preun xscreensaver-base min/max EVR
- don't let %%preun fail
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 0.8.1.p-9
- Buildrequire gawk.
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 0.8.1.p-8
- Rebuild for selinux ppc32 issue.
* Thu Jun 14 2007 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-7
- build xscreensaver hack description files (#200881)
- require %{_bindir}/kxsconfig (#219106)
* Mon Aug 28 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-6
- FC6 mass rebuild
* Tue Aug 01 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-5
- don't install world-writable documentation files (#200843)
* Mon Jul 24 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-4
- require libtool for building
* Mon Jun 12 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-3
- move gnome-screensaver desktop files to match new location in FC6 (#194862)
* Fri Jun 02 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-2
- replace symlinked source files with copies to work around #189928
- honour RPM optflags
* Mon May 29 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-1
- bump release
* Fri May 26 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-0.6
- symlink hacks to /usr/libexec/xscreensaver
- own directories not included in filesystem
* Wed May 24 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-0.5
- include %%{patchext} in version
- fix excessively long line in %%description
- make -kde require -xscreensaver
- fix "Actions", add "X-KDE-Category" and "X-KDE-Type" to KDE desktop files
* Tue May 23 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-0.4
- remove executable bit from doc files, change README.fedora accordingly
- use %%buildroot consistently
- don't ship rss-glx_install.pl
- make %%description more understandable (Jason Tibbitts)
* Mon May 22 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-0.3
- include README.fedora, rss-glx-rm-matrixview.sh, rss-glx-0.8.1-0.8.1.p.diff
to be able to generate patched from upstream tarball
- versionize %%changelog
- don't obsolete rss_glx
- don't distribute zero-length AUTHORS and NEWS files
* Mon Apr 03 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1.p-0.2
- add libXt-devel to modular X build requirements (#90133)
* Tue Mar 28 2006 Nils Philippsen <nphilipp@redhat.com>
- use freealut when needed
* Fri Mar 10 2006 Nils Philippsen <nphilipp@redhat.com>
- add build requirements for non-modular X, default determined by Fedora
version
- patch tarball to remove matrixview
- don't build gnome-screensaver subpackage before FC5
* Thu Mar 09 2006 Nils Philippsen <nphilipp@redhat.com> 0.8.1
- version 0.8.1
- include gnome-screensaver support
- new build requirements for FC5
* Wed Jul 07 2004 Nils Philippsen <nphilipp@redhat.com>
- rebuild for FC2
* Wed Sep 10 2003 Nils Philippsen <nphilipp@redhat.com>
- version 0.7.6
- manage new matrixview and spirographx hacks in XScreensaver.ad
* Fri Jul 04 2003 Nils Philippsen <nphilipp@redhat.com>
- version 0.7.4
- fix temp file issue in scripts
- buildrequire OpenAL-devel
- move stuff out of /usr/X11R6
- patch inline asm to work with new gcc versions
- remove hacks from XScreensaver.ad in %%preun