File mingw64-xpm-nox.spec of Package mingw64-xpm-nox

#
# spec file for package mingw64-xpm-nox
#
# Copyright (c) 2014 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/
#


Name:           mingw64-xpm-nox
Version:        4.2.0
Release:        0
Summary:        X Pixmap library not using X
License:        Groupe Bull
Group:          Development/Libraries/C and C++
Url:            ftp://koala.inria.fr/pub/xpm
Source0:        xpm-nox-%{version}.tar.bz2
#!BuildIgnore: post-build-checks
Patch0:         xpm-nox-4.2.0-mingw.patch
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-filesystem >= 30
%_mingw64_package_header_debug
BuildArch:      noarch

%description
XPM (X PixMap) is a format for storing/retrieving X pixmaps to/from files.

Here is provided a library containing a set of four functions, similar to
the X bitmap functions as defined in the Xlib: XpmCreatePixmapFromData,
XpmCreateDataFromPixmap, XpmReadFileToPixmap and XpmWriteFileFromPixmap
for respectively including, storing, reading and writing this format, plus
four other: XpmCreateImageFromData, XpmCreateDataFromImage,
XpmReadFileToImage and XpmWriteFileFromImage for working with images
instead of pixmaps.

%package -n mingw64-libXpm-noX4
Summary:        X Pixmap library not using X
Group:          System/Libraries
Obsoletes:      %{name}
Provides:       %{name}

%description -n mingw64-libXpm-noX4
XPM (X PixMap) is a format for storing/retrieving X pixmaps to/from files.

Here is provided a library containing a set of four functions, similar to
the X bitmap functions as defined in the Xlib: XpmCreatePixmapFromData,
XpmCreateDataFromPixmap, XpmReadFileToPixmap and XpmWriteFileFromPixmap
for respectively including, storing, reading and writing this format, plus
four other: XpmCreateImageFromData, XpmCreateDataFromImage,
XpmReadFileToImage and XpmWriteFileFromImage for working with images
instead of pixmaps.

This new version provides a C includable format, defaults for different
types of display: monochrome/color/grayscale, hotspot coordinates and symbol
names for colors for overriding default colors when creating the pixmap. It
provides a mechanism for storing information while reading a file which is
re-used while writing. This way comments, default colors and symbol names
aren't lost. It also handles "transparent pixels" by returning a shape mask
in addition to the created pixmap.

%package devel
Summary:        X Pixmap library not using X
Group:          Development/Libraries/C and C++

%description devel
XPM (X PixMap) is a format for storing/retrieving X pixmaps to/from files.

Here is provided a library containing a set of four functions, similar to
the X bitmap functions as defined in the Xlib: XpmCreatePixmapFromData,
XpmCreateDataFromPixmap, XpmReadFileToPixmap and XpmWriteFileFromPixmap
for respectively including, storing, reading and writing this format, plus
four other: XpmCreateImageFromData, XpmCreateDataFromImage,
XpmReadFileToImage and XpmWriteFileFromImage for working with images
instead of pixmaps.

This new version provides a C includable format, defaults for different
types of display: monochrome/color/grayscale, hotspot coordinates and symbol
names for colors for overriding default colors when creating the pixmap. It
provides a mechanism for storing information while reading a file which is
re-used while writing. This way comments, default colors and symbol names
aren't lost. It also handles "transparent pixels" by returning a shape mask
in addition to the created pixmap.

%_mingw64_debug_package

%prep
%setup -q -n xpm-nox-%{version}
%patch -P 0 -p1 -b .mingw

%build
%{_mingw64_make} %{?_smp_mflags} || %{_mingw64_make}

%install
%{_mingw64_make} DESTDIR=%{buildroot} install
rm -rf %{buildroot}%{_mingw64_libdir}/libXpm.a

%files -n mingw64-libXpm-noX4
%defattr(-,root,root)
%{_mingw64_bindir}/libXpm-noX4.dll

%files devel
%defattr(-,root,root)
%{_mingw64_bindir}/cxpm-noX.exe
%{_mingw64_libdir}/libXpm.dll.a
%{_mingw64_includedir}/noX
%{_mingw64_mandir}/man1/cxpm-noX.1*

%changelog
openSUSE Build Service is sponsored by