File libwmf.spec of Package libwmf

#
# spec file for package libwmf (Version 0.2.8.4)
#
# 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:           libwmf
BuildRequires:  gd-devel gtk2-devel libtiff-devel libxml2-devel update-desktop-files
Provides:       wv:/usr/bin/wmftopng
Provides:       mswordvw:/usr/bin/wmftopng
License:        GPL v2 or later; LGPL v2.1 or later
Group:          System/Libraries
AutoReqProv:    on
Version:        0.2.8.4
Release:        206.<RELEASE24>
Summary:        Library and Utilities for Displaying and Converting Metafile Images
Url:            http://wvWare.sourceforge.net/
Source:         libwmf-%{version}.tar.bz2
Patch:          libwmf-%{version}-ia64.patch
Patch1:         libwmf-%{version}-fix.patch
Patch2:         libwmf-%{version}-config.patch
Patch3:         libwmf-%{version}-overflow-CVE-2006-3376.patch
Patch4:         libwmf-%{version}-bnc495842.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This library interprets metafile images and can either display them
using the X Window System or convert them to standard formats such as
PNG, JPEG, PS, EPS, and more.



Authors:
--------
    Caolan McNamara 
    Francis James Franklin <fjf@alinameridon.com>

%package devel
License:        LGPL v2.1 or later
Requires:       libwmf = %{version} libwmf-gnome = %{version}
Provides:       wv-devel:/usr/lib/libwmf.a
Provides:       mswordvd:/usr/lib/libwmf.a
Summary:        Static libraries, header files and documentation for libwmf
Group:          Development/Libraries/C and C++
AutoReqProv:    on
Requires:       libwmf libjpeg-devel libpng-devel xorg-x11-devel 

%description devel
The libwmf-devel package contains the header files and static libraries
necessary for developing programs using libwmf.



Authors:
--------
    Caolan McNamara 
    Francis James Franklin <fjf@alinameridon.com>

%package gnome
License:        LGPL v2.1 or later
Summary:        GNOME plugin for displaying and Converting Metafile Images
Group:          System/Libraries

%description gnome
This library interprets metafile images and can either display them
using the X Window System or convert them to standard formats such as
PNG, JPEG, PS, EPS, and more.



Authors:
--------
    Caolan McNamara 
    Francis James Franklin <fjf@alinameridon.com>

%prep
%setup 
%patch
%patch1
%patch2
%patch3
%patch4

%build
%{?suse_update_config:%{suse_update_config -f }}
libtoolize --force
aclocal 
automake
autoconf
CFLAGS="$RPM_OPT_FLAGS -fstack-protector" \
  ./configure --prefix=/usr $RPM_ARCH-suse-linux --enable-magick --libdir=%{_libdir}
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/include/libwmf
make DESTDIR=$RPM_BUILD_ROOT \
     wmfdocdir=%{_defaultdocdir}/libwmf \
     wmfonedocdir=%{_defaultdocdir}/libwmf/caolan \
     install
cp AUTHORS COPYING CREDITS ChangeLog README TODO $RPM_BUILD_ROOT/%{_defaultdocdir}/libwmf

%clean
rm -rf $RPM_BUILD_ROOT

%post
%run_ldconfig

%postun
%run_ldconfig

%files
%defattr(-,root,root)
/usr/bin/libwmf-fontmap
/usr/bin/wmf2eps
/usr/bin/wmf2fig
/usr/bin/wmf2gd
#/usr/bin/wmf2magick
#/usr/bin/wmf2plot
/usr/bin/wmf2svg
/usr/bin/wmf2x
#
%{_libdir}/libwmf*.so.*
#
/usr/share/libwmf
#
%dir %{_defaultdocdir}/libwmf
%doc %{_defaultdocdir}/libwmf/AUTHORS
%doc %{_defaultdocdir}/libwmf/COPYING
%doc %{_defaultdocdir}/libwmf/CREDITS
%doc %{_defaultdocdir}/libwmf/ChangeLog
%doc %{_defaultdocdir}/libwmf/README
%doc %{_defaultdocdir}/libwmf/TODO

%files gnome
%defattr(-,root,root)
%{_libdir}/gtk-*/*/loaders/*.so

%files devel
%defattr(-,root,root)
/usr/bin/libwmf-config
/usr/include/libwmf
%{_libdir}/libwmf*.so
%{_libdir}/libwmf*.a
%{_libdir}/libwmf*.la
%{_libdir}/gtk-*/*/loaders/*.*a
#
%doc %{_defaultdocdir}/libwmf/*.html
%doc %{_defaultdocdir}/libwmf/*.png
%doc %{_defaultdocdir}/libwmf/*.gif
%doc %{_defaultdocdir}/libwmf/caolan
%doc %{_defaultdocdir}/libwmf/html

%changelog
* Mon Apr 20 2009 nadvornik@suse.cz
- fixed realloc return value usage [bnc#495842]
* Tue Nov 25 2008 sbrabec@suse.cz
- Supplement gtk2-32bit/gtk2-64bit in baselibs.conf (bnc#354164).
* Tue Jan 16 2007 nadvornik@suse.cz
- changed gnome prefix to /usr
* Thu Aug 24 2006 cthiel@suse.de
- fix build
* Tue Aug 22 2006 nadvornik@suse.cz
- branched libwmf-gnome subpackage [#195613]
* Wed Jul 12 2006 nadvornik@suse.cz
- fixed integer overflow [CVE-2006-3376. #189924]
* Tue Jun 27 2006 nadvornik@suse.cz
- updated to bugfix release 0.2.8.4
  * fixes various compiler warnings [#185398]
* Thu Jan 26 2006 nadvornik@suse.cz
- fixed undefined code [#136822]
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 12 2006 nadvornik@suse.cz
- compile with -fstack-protector
* Tue Sep 20 2005 nadvornik@suse.cz
- fixed uninitialized variables and missing includes
* Tue Jul 26 2005 nadvornik@suse.cz
- fixed devel requirements [#98131]
* Mon Apr 04 2005 nadvornik@suse.cz
- fixed more missing return values
* Mon Apr 19 2004 nadvornik@suse.cz
- fixed missing return values
* Sat Jan 10 2004 adrian@suse.de
- add %%defattr and %%run_ldconfig
* Wed Jan 07 2004 nadvornik@suse.cz
- updated to 0.2.8.2 to build with new freetype
* Thu Jul 31 2003 ro@suse.de
- move gtk-stuff to /opt/gnome
* Mon Jul 14 2003 sbrabec@suse.cz
- GNOME prefix change to /opt/gnome.
* Mon Jun 16 2003 sbrabec@suse.cz
- Updated to version 0.2.8.
- Updated neededforbuild and %%files.
* Thu May 29 2003 nadvornik@suse.cz
- packaged html documentation
* Tue Sep 10 2002 pthomas@suse.de
- Change libwmf-config to omit /usr/include from output.
* Tue Sep 03 2002 nadvornik@suse.cz
- fixed crash with ImageMagick
* Fri Jul 26 2002 adrian@suse.de
- fix neededforbuild
* Thu Jun 20 2002 nadvornik@suse.cz
- update to 0.2.6
* Mon Apr 29 2002 nadvornik@suse.cz
- used macro %%{_libdir}
* Wed Mar 13 2002 nadvornik@suse.cz
- added /usr/share/doc/packages/libwmf to filelist
* Fri Feb 01 2002 ro@suse.de
- changed neededforbuild <libpng> to <libpng-devel-packages>
* Wed Nov 28 2001 nadvornik@suse.cz
- update to 0.2.2:
  - the .fig export uses scaling now, and has options to save images
  as PNG or JPEG
  - the .svg export now supports inline images and compression to .svgz
  - a slight change in the API
* Thu Jun 28 2001 nadvornik@suse.cz
- splited from wv
- update to 0.2.0
openSUSE Build Service is sponsored by