File pixmap.spec of Package pixmap

#
# spec file for package pixmap (Version 2.6)
#
# Copyright (c) 2009 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:           pixmap
Url:            ftp://ftp.x.org/contrib/applications/pixmap
BuildRequires:  xorg-x11 xorg-x11-devel
License:        BSD 3-Clause
Group:          Productivity/Graphics/Bitmap Editors
Provides:       pixmap26
Conflicts:      mmextra
AutoReqProv:    on
Version:        2.6
Release:        125
Provides:       pixmp = %version
Obsoletes:      pixmp <= %version
Summary:        XPM Pixel Editor for the X Window System
Source:         pixmap2.6.tar.gz
# upstream patches
Patch0:         pixmap_2.6.patch1.gz
Patch1:         pixmap_2.6.patch2.gz
Patch2:         pixmap_2.6.patch3.gz
Patch3:         pixmap_2.6.patch4.gz
# end of upstream patches
Patch4:         pixmap2.6.patch
Patch5:         pixmap2.6-ia64.patch
Patch6:         pixmap-nonvoid.patch
Patch7:         pixmap-xorg7.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Pixmap is a program which enables you to edit XPM-files (colour
bitmaps). You can use them with every commonly used iconmanager and
even incorporate them in your own desktop environment.



Authors:
--------
    Lionel Mallet <pixmap@sophia.inria.fr>
    Tim Wise      <pixmap@sophia.inria.fr>

%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_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_prefix /usr/X11R6
%endif

%prep
%setup -n pixmap
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
# use this patch only if new X.org 7.x or higher is present
%if "%(xft-config --prefix)" == "/usr"
%patch7
%endif
# contains data used for earlier versions of X.
rm -rf X11

%build
xmkmf -a
make -C SelFile CCOPTIONS="$RPM_OPT_FLAGS"
make CCOPTIONS="$RPM_OPT_FLAGS"

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

%files
%defattr(-,root,root)
/usr/%{_xorg7bin}/pixmap
/usr/%{_xorg7libs32}/X11/Pixmap
%config /usr/%{_xorg7libshare}/X11/app-defaults/Pixmap
/usr/%{_xorg7libs}/libXgnu.a
%doc %{_xorg7_mandir}/man1/pixmap.1x.gz
%doc README COPYRIGHT CHANGES  

%clean
rm -rf "$RPM_BUILD_ROOT"

%changelog
* Fri Feb 15 2008 lmichnovic@suse.cz
- removed requirement with dot-in-identifier
* Mon Aug 06 2007 ro@suse.de
- renamed to pixmap
* Thu Jul 27 2006 lmichnovic@suse.cz
- builds also with new X.org 7.x, checks the version of X.org
* Thu Jun 15 2006 lmichnovic@suse.cz
- deleted from install section: rm -rf $RPM_BUILD_ROOT
* Mon Mar 13 2006 lmichnovic@suse.cz
- fixed non-void function [#156966]
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Oct 07 2005 meissner@suse.de
- delete included X11 headers to use system ones.
* Thu May 12 2005 meissner@suse.de
- use RPM_OPT_FLAGS.
* Sun Apr 10 2005 coolo@suse.de
- fix some more return values
* Thu Jul 01 2004 bg@suse.de
- fix Imakefile for hppa
* Mon May 24 2004 ro@suse.de
- add some return values to non-void functions
* Fri May 21 2004 ro@suse.de
- fix build
* Sun Jan 11 2004 adrian@suse.de
- add %%defattr
* Tue Nov 12 2002 jderfina@suse.cz
- fixed neededforbuild which is broken with renamed XFree86 package.
* Wed May 22 2002 nadvornik@suse.cz
- used %%{_lib} macro
* Thu May 17 2001 nadvornik@suse.cz
- fixed cast warnings and include files for ia64
* Thu May 18 2000 nadvornik@suse.cz
- changed Group tag
* Tue Mar 14 2000 nadvornik@suse.cz
- removed Makefile.Linux
- added BuildRoot
- added patches from ftp://ftp.x.org/contrib/applications/pixmap
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Sun Sep 20 1998 ro@suse.de
- dont redeclare sys_errlist for glibc
openSUSE Build Service is sponsored by