File xroach.spec of Package xroach

#
# spec file for package xroach (Version 12.6.97)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           xroach
BuildRequires:  xorg-x11 xorg-x11-devel
License:        FSR, Other License(s), see package
Group:          Amusements/Toys/Background
Autoreqprov:    on
Version:        12.6.97
Release:        1032
Summary:        Some cockroaches on your root window
Source:         %{name}.tar.bz2
Source1:        toon_root.c
Source2:        README.SuSE
Patch:          xroach.dif
Patch1:         xroach-return.dif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if "%(xft-config --prefix)" == "/usr"
%define _xorg7libs %_lib
%define _xorg7libs32 lib
%define _xorg7bin bin
%define _xorg7_mandir %_mandir
%define _xorg7pixmaps include
%define _xorg7libshare share
%define _xorg7_xkb /usr/share/X11/xkb
%define _xorg7_termcap /usr/lib/X11/etc
%define _xorg7_serverincl /usr/include/xorg
%define _xorg7_fonts /usr/share/fonts
#%define _xorg7_config /usr/share/X11/config #use libshare macro
%define _xorg7_prefix /usr
%else
%define _xorg7libs X11R6/%_lib
%define _xorg7libs32 X11R6/lib
%define _xorg7bin X11R6/bin
%define _xorg7_mandir /usr/X11R6/man
%define _xorg7pixmaps X11R6/include
%define _xorg7libshare X11R6/lib/
%define _xorg7_xkb /etc/X11/xkb
%define _xorg7_termcap /usr/X11R6/lib/X11/etc
%define _xorg7_serverincl /usr/X11R6/lib/Server/include
%define _xorg7_fonts /usr/X11R6/lib/X11/fonts
#%define _xorg7_config /usr/X11R6/lib/X11/config #use libshare macro
%define _xorg7_prefix /usr/X11R6
%endif

%description
Xroach displays disgusting cockroaches on your root window. These
creepy crawlies scamper around until they find a window to hide under.
Whenever you move or iconify a window, the exposed orthopteras again
scamper for cover.



Authors:
--------
    J.T. Anderson <jta@locus.com>
    Robin Hogan <R.J.Hogan@reading.ac.uk>

%prep
%setup -n xroach
%patch
%patch1
cp %{S:1} %{S:2} .

%build
export CFLAGS="$RPM_OPT_FLAGS"
xmkmf -a
make %{?jobs:-j%jobs}

%install
make DESTDIR="$RPM_BUILD_ROOT" install
make DESTDIR="$RPM_BUILD_ROOT" install.man

%files
%defattr(-,root,root)
%doc README.SuSE
/usr/%{_xorg7bin}/xroach
%doc %{_xorg7_mandir}/man1/*

%clean
rm -rf $RPM_BUILD_ROOT

%changelog -n xroach
* Fri Jul 28 2006 - lmichnovic@suse.cz
- builds also with new X.org 7.x, detecting prefix in X.org
- building with icecream
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Apr 07 2005 - coolo@suse.de
- fix gcc4 warnings
* Fri Jun 25 2004 - hmacht@suse.de
- building as non-root user
* Tue May 18 2004 - ltinkl@suse.cz
- fix return values
- use RPM_OPT_FLAGS
- repackage to tar.bz2
* Wed Nov 28 2001 - cihlar@suse.cz
- fixed to work under KDE - fix based on xpenguins
- added README.SuSE
* Wed Nov 22 2000 - cihlar@suse.cz
- fixed copyright
* Fri May 19 2000 - cihlar@suse.cz
- Group sorted
* Fri Mar 10 2000 - cihlar@suse.cz
- removed makefile.linux
- added BuildRoot to spec file
* Mon Sep 13 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Thu Jun 12 1997 - rj@suse.de
- new package (06/12/1997)