File xgrabsc.spec of Package xgrabsc

#
# spec file for package xgrabsc (Version 2.41)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           xgrabsc
Url:            ftp://ftp.x.org/contrib/applications/
BuildRequires:  libgcc libstdc++ ncurses-devel openmotif openmotif-devel update-desktop-files xorg-x11
License:        Any permissive; X11/MIT
Group:          System/X11/Utilities
AutoReqProv:    on
Version:        2.41
Release:        1225
Summary:        A Screen Grabber for the X Window System.
Source:         xgrabsc-%{version}.tar.bz2
Source1:        xgrabsc.desktop
Patch:          xgrabsc-%{version}.patch
Patch1:         xgrabsc-%{version}-gcc4.patch
Patch2:         xgrabsc-%{version}-implicit_decl.patch
Patch3:         xgrabsc-%{version}-no_xrdb.patch
Patch4:         xgrabsc-%{version}-new_ncurses.patch
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
%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/
%endif

%description
You need screenshots?

xgrab and xgrabsc are powerful tools to save screenshots in files (ps,
xpm, and more) or to print them. xgrabsc is invoked from a shell and
sends the rectangle grabbed on the screen to standard output. xgrab is
a menu-driven front-end to xgrabsc.

This program works only in PPM, XPM, and non-color PostScript formats
for display larger then 8 bits per pixel deep.

Documentation may be obtained by typing man xgrab and man xgrabsc.  The
author's original comments can be found in
/usr/share/doc/packages/xgrabsc.



Authors:
--------
    Bruce Schuchardt <bruce@slc.com>
    Yves Arrouye
    George Ferguson
    David Lawrence
    Alan Kent
    Brian C. Smith
    Johan Garpendal
    Martin Birgmeier
    Vasco Lopes Paulo
    Hal R. Brand
    Matt Freedman
    Scott McCoy

%prep
%setup -q
%patch
%patch1 -p1
%patch2
%patch3
# ncurses include dir changed after 11.0
%if %suse_version > 1100
%patch4
%endif

%build
xmkmf
make clean
make %{?jobs:-j%jobs}

%install
make install install.man DESTDIR=$RPM_BUILD_ROOT
%suse_update_desktop_file -i %name Utility DesktopUtility

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc Acks Bugs README README.2_4
%doc %{_xorg7_mandir}/man1/*.gz
%config /usr/%{_xorg7libshare}/X11/app-defaults/XGrab
/usr/share/applications/*.desktop
/usr/%{_xorg7bin}/xgrab
/usr/%{_xorg7bin}/xgrabsc

%changelog
* Fri Aug 22 2008 lmichnovic@suse.cz
- fixed changed include dir of ncurses (new_ncurses.patch)
* Mon Dec 17 2007 ro@suse.de
- do not use xrdb in buildsystem
* Fri Mar 30 2007 ro@suse.de
- added ncurses-devel to buildreq
* Thu Jul 27 2006 lmichnovic@suse.cz
- builds also with new X.org 7.x, checks the version of X.org
- building with icecream
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Oct 11 2005 lmichnovic@suse.cz
- fixed segfault on x86_64 arch: explicit declarations of system functions was missing (#116956)
* Fri Apr 29 2005 ltinkl@suse.cz
- fix build with gcc4
* Thu Sep 23 2004 ltinkl@suse.cz
- change the desktop file to something usable under X Window (#45814)
* Wed May 19 2004 ro@suse.de
- added return values to non-void functions
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Fri Aug 15 2003 adrian@suse.de
- add desktop file
* Tue Nov 12 2002 jderfina@suse.cz
- fixed neededforbuild which is broken with renamed XFree86 package
* Mon May 21 2001 pblaha@suse.cz
- skip compressing colormap in xgrabsc
- create default resource for click and ppm
- fix bug #8542
* Mon Nov 20 2000 pblaha@suse.cz
- support for openmotif
* Wed Oct 18 2000 pblaha@suse.cz
- write patch to work on display > 8bpp  and use lesstiff
* Mon May 29 2000 bubnikv@suse.cz
- filled Group: tag
* Wed May 24 2000 bubnikv@suse.cz
- using gpp preprocessor instead of xrdb for X resource file
* Mon Apr 03 2000 bubnikv@suse.cz
- added buildroot
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Fri Oct 24 1997 @suse.de
- back to xrdb since build is prepared for that
* Wed Oct 22 1997 ro@suse.de
- ready for autobuild
  using myxrdb instead of xrdb
* Thu Jan 02 1997 maddin@suse.de
  changed to new version 2.41
  copy also READMEs and textfiles to /usr/doc/packages/xgrabsc
  changed install pathes from /usr/bin/X11 and similar to /usr/X11R6/bin etc
  changed default paper size to A4
  pkgmake compile now does a make clean before compiling to avoid nasty
  side effects
  xgrabsc HAS TO BE compiled under X11
openSUSE Build Service is sponsored by