rss-glx/rss-glx.spec

564 lines
19 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.9.1%{patchext}
Release: 22%{?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://downloads.sourceforge.net/sourceforge/rss-glx/rss-glx_%{version}.tar.bz2
Source0: rss-glx_%{version}.tar.bz2
Source1: README.fedora
# The following two strip matrixview from the package and build a new tarball
Source2: rss-glx-rm-matrixview.sh
Source3: rss-glx-0.9.1-0.9.1.p.diff
# https://sourceforge.net/tracker/?func=detail&aid=2839037&group_id=67131&atid=517003
Patch0: rss-glx-0.9.0.p-optflags.patch
Patch1: rss-glx-0.9.1.p-linker.patch
Patch10: rss-glx-0.9.1.p-6-autoreconf.patch.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: libGL-devel
BuildRequires: libGLU-devel
BuildRequires: glew-devel
BuildRequires: quesoglc-devel
BuildRequires: ImageMagick-devel >= 6.4
%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: freealut-devel
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 .optflags
%patch1 -p1 -b .linker
%patch10 -p1 -b .autoreconf
%build
%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 "\"; desktopfilename=\"rss-glx-" $2 ".desktop\"; cmd=\"rss-glx-" $3 "\"; desc=\"" $4 "\""}')
trycmd="${cmd%%%% *}"
origtrycmd="${trycmd#rss-glx-}"
cat << EOF > %{buildroot}%{_gssconfigdir}/${desktopfilename}
[Desktop Entry]
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 {
if ($0 ~ "^Type=") {
print "Type=Service";
print "X-KDE-ServiceTypes=ScreenSaver";
} else {
if ($0 !~ "^Encoding=") {
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
rm %{buildroot}%{_bindir}/rss-glx-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§biof§This is an attempt to recreate some of the work of William Latham.
Busy Spheres§busyspheres§busyspheres§Spheres made of dancing particles.
Colorfire§colorfire§colorfire§Burning colors.
Cyclone§cyclone§cyclone§A cyclone made of particles.
Drempels§drempels§drempels§A hallucinatory desktop enhancer.
Euphoria§euphoria§euphoria§Psychedelic shapes.
Feedback§feedback§feedback§Stirring colors with a jiggling warp.
Fieldlines§fieldlines§fieldlines§A simulation of the electric field lines between charged particles.
Flocks§flocks§flocks§Floating wisps.
Flux§flux§flux§Flux fields and stuff.
Helios§helios§helios§Attraction/repulsion particle effects and some smooth surfaces.
Hufo's Smoke§hufo_smoke§hufo_smoke§Particle smoke effect.
Hufo's Tunnel§hufo_tunnel§hufo_tunnel§Inside a tunnel.
Hyperspace§hyperspace§hyperspace§Flying through hyper space.
Lattice§lattice§lattice§Fly through an endless world of linked rings.
Lorenz§lorenz§lorenz§A visualization of the Lorenz Attractor fractal.
%if %{with matrixview}
MatrixView§matrixview§matrixview§The Matrix.
%endif
Pixel City§pixelcity§pixelcity§Procedural city fly through.
Plasma§plasma§plasma§Oozing plasma.
Skyrocket (silent)§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§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§solarwinds§This is a very mesmerizing particle effects saver.
SpirographX§spirographx§spirographx§Spirograph-like screensaver.
Sundancer2§sundancer2§sundancer2§Rotating stack of quads.
EOF
cd %buildroot/%{xssconfigdir}/
for file in *.xml; do
mv -f $file rss-glx-$file
done
%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
%doc README.fedora rss-glx-rm-matrixview.sh rss-glx-0.9.1-0.9.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
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1.p-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1.p-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Apr 02 2014 josef radinger <cheese@nosuchhost.net> - 0.9.1.p-20
- fix date in changelog
* Tue Apr 01 2014 josef radinger <cheese@nosuchhost.net> - 0.9.1.p-19
- rename xml-files (#744862)
* Mon Nov 18 2013 Dave Airlie <airlied@redhat.com> - 0.9.1.p-18
- rebuilt for GLEW 1.10
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1.p-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sat Mar 30 2013 Kevin Fenzi <kevin@scrye.com> - 0.9.1.p-16
- Rebuild for broken deps in rawhide
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1.p-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Dec 13 2012 Adam Jackson <ajax@redhat.com> - 0.9.1.p-14
- Rebuild for glew 1.9.0
* Wed Aug 01 2012 Adam Jackson <ajax@redhat.com> - 0.9.1.p-13
- -Rebuild for new glew
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1.p-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Apr 13 2012 Tom Callawau <spot@fedoraproject.org> - 0.9.1.p-11
- rebuild for new ImageMagick
* Tue Jan 10 2012 Nils Philippsen <nils@redhat.com> - 0.9.1.p-10
- rebuild for gcc 4.7
* Mon Jul 04 2011 Nils Philippsen <nils@redhat.com> - 0.9.1.p-9
- rebuild against new ImageMagick
* Mon Jun 20 2011 ajax@redhat.com - 0.9.1.p-8
- Rebuild for new glew soname
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1.p-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Oct 11 2010 Nils Philippsen <nils@redhat.com> 0.9.1.p-6
- fix silent skyrocket desktop filename (#617531)
* Wed Sep 29 2010 jkeating - 0.9.1.p-5
- Rebuilt for gcc bug 634757
* Wed Sep 15 2010 Nils Philippsen <nils@redhat.com> 0.9.1.p-4
- rebuild for new ImageMagick
* Sun Apr 11 2010 Caolán McNamara <caolanm@redhat.com> 0.9.1.p-3
- Resolves: rhbz#564845 Fix ImplicitDSOLinking
* Tue Jan 26 2010 Nils Philippsen <nils@redhat.com> 0.9.1.p-2
- add autoreconf patch, the optflags patch isn't worth much without it
(#558561)
* Mon Jan 18 2010 Nils Philippsen <nils@redhat.com> 0.9.1.p-1
- version 0.9.1.p
- remove autofoo patch
- add BR: quesoglc-devel for new pixelcity hack
- bump BR: ImageMagick-devel >= 6.4
* Tue Sep 01 2009 Nils Philippsen <nils@redhat.com> 0.9.0.p-3
- don't ship prefixed rss-glx-rss-glx_install.pl
* Tue Aug 18 2009 Nils Philippsen <nils@redhat.com>
- explain autofoo patch
* Mon Aug 17 2009 Nils Philippsen <nils@redhat.com> 0.9.0.p-2
- don't rebuild autofoo files
* Mon Aug 17 2009 Nils Philippsen <nils@redhat.com> 0.9.0.p-1
- version 0.9.0.p
- build with GLEW
- don't distribute README
- replace flags by optflags patch
- remove obsolete gcc-4.3 patch
- remove symlinked source files workaround (#189928)
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2.p-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2.p-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Mon Dec 22 2008 Nils Philippsen <nils@redhat.com> 0.8.2.p-1
- use autoreconf to avoid using non-matching ltmain.sh
* Wed Dec 17 2008 Nils Philippsen <nils@redhat.com>
- correct KDE desktop files so that they work with KDE 4.1
- remove encoding lines from desktop files as they're deprecated
* Tue Dec 16 2008 Nils Philippsen <nils@redhat.com>
- version 0.8.2.p
- remove obsolete freealut patch
- update flags, gcc43 patches
* 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
* Thu 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