File gtkmathview.spec of Package gtkmathview

#
# spec file for package gtkmathview
#
# Copyright (c) 2012 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/
#


Url:            http://helm.cs.unibo.it/mml-widget/

Name:           gtkmathview
Version:        0.8.0
Release:        0
Summary:        A rendering engine for MathML documents
License:        GPL-2.0+ ; LGPL-3.0+
Group:          System/Libraries
Source0:        %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM gtkmathview-git-fixes.patch vuntz@opensuse.org -- Fixes from git
Patch0:         gtkmathview-git-fixes.patch
# PATCH-FIX-UPSTREAM gtkmathview-other-fixes.patch vuntz@opensuse.org -- Missing return value (sent upstream by mail -- vuntz, 2012-03-21)
Patch1:         gtkmathview-other-fixes.patch
# PATCH-FIX-UPSTREAM gtkmathview-0.8.0-gcc47.patch aj@suse.de -- Fix build with gcc 4.7 (sent upstream by mail -- vuntz, 2012-03-21)
Patch2:         gtkmathview-0.8.0-gcc47.patch
BuildRequires:  gcc-c++
BuildRequires:  glib2-devel >= 2.2.1
BuildRequires:  gmetadom-devel >= 0.1.8
BuildRequires:  gtk2-devel >= 2.2.1
# needed for patch0
BuildRequires:  libtool
BuildRequires:  libxml2-devel >= 2.6.7
BuildRequires:  libxslt
BuildRequires:  popt-devel
BuildRequires:  t1lib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
GtkMathView is a C++ rendering engine for MathML documents. It provides
an interactive view that can be used for browsing and editing MathML
markup.

%package -n libgtkmathview
Summary:        A rendering engine for MathML documents
Group:          System/Libraries

%description -n libgtkmathview
GtkMathView is a C++ rendering engine for MathML documents. It provides
an interactive view that can be used for browsing and editing MathML
markup.

%package devel
Summary:        A rendering engine for MathML documents
Group:          System/Libraries
Requires:       glib2-devel >= 2.2.1
Requires:       libgtkmathview = %{version}
Requires:       t1lib-devel

%description devel
GtkMathView is a C++ rendering engine for MathML documents. It provides
an interactive view that can be used for browsing and editing MathML
markup.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
# needed for patch0
# AM_BINRELOC missing, just ignore
echo 'AC_DEFUN([AM_BINRELOC], [])' > acinclude.m4

%build
# needed for patch0
autoreconf -si
%configure --disable-static
make

%install
%makeinstall
find $RPM_BUILD_ROOT -name \*.la -exec rm {} \;

%post -n libgtkmathview -p /sbin/ldconfig

%postun -n libgtkmathview -p /sbin/ldconfig

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%{_bindir}/*
%{_mandir}/man1/*

%files -n libgtkmathview
%defattr(-,root,root)
%{_libdir}/lib*.so.*
%{_datadir}/%{name}
%{_sysconfdir}/%{name}

%files devel
%defattr(-,root,root)
%{_libdir}/pkgconfig/*.pc
%{_includedir}/%{name}
%{_libdir}/*.so

%changelog
openSUSE Build Service is sponsored by