File gtkextra3.spec of Package gtkextra3
#
# spec file for package gtkextra3
#
# 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/
#
%define tarname gtkextra
%define sfxname gtkextra-3.0
%define major 3
%define minor 0
%define soname 7
%define docs tutorial/html
Name: gtkextra3
Version: 3.1.1
Release: 0
Summary: Additional Widget Library for GTK
License: LGPL-2.0
Group: System/Libraries
Url: http://gtkextra.sourceforge.net/
Source: http://prdownloads.sourceforge.net/scigraphica/%{tarname}-%{version}.tar.bz2
#PATCH-FIX-OPENSUSE gtkextra-3.1.1_no-return.patch avvissu@yandex.ru -- Fix no-return-in-nonvoid-function
Patch0: gtkextra-3.1.1_no-return.patch
#PATCH-FIX-UPSTREAM incorrect-fsf-address.patch avvissu@yandex.ru -- Fix wrong fsf address
Patch1: incorrect-fsf-address.patch
BuildRequires: glib2-devel
BuildRequires: gtk-doc
BuildRequires: gtk2-devel
BuildRequires: intltool
BuildRequires: libtool
BuildRequires: pcre-devel
BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{defined centos_version}
BuildRequires: perl-IO-Compress
%endif
%description
%{name} is a library with additional wigets for GTK.
%package -n lib%{tarname}-x11-%{major}_%{minor}-%{soname}
Summary: Shared libraries from %{name}
Group: Development/Libraries/C and C++
Obsoletes: %{tarname} < %{version}
Provides: %{tarname} = %{version}
%description -n lib%{tarname}-x11-%{major}_%{minor}-%{soname}
Shared libraries from %{name} for GTK wigets.
%package devel
Summary: Additional Widget Library for GTK
Group: Development/Libraries/C and C++
Requires: glib2-devel
Requires: gtk2-devel
Requires: lib%{tarname}-x11-%{major}_%{minor}-%{soname}
%description devel
%{name} is a library with additional wigets for GTK.
This package contains development files (headers, shared library links)
and is only needed to build applications with %{name}
It is not needed at runtime.
%package doc
Summary: Documentation files for gtkextra2
Group: Development/Libraries/C and C++
%if 0%{?suse_version}
Recommends: lib%{tarname}-x11-%{major}_%{minor}-%{soname}
%endif
%description doc
GtkExtra is a library with additional wigets for GTK.
This package contains extra documentation files:
* a reference and a
* tutorial
%prep
%setup -q -n "%{tarname}-%{version}"
chmod a-x ChangeLog
sed -i 's/\r//' docs/{gtk*.ChangeLog,HELP,README,TODO,VERSION}
%patch0 -p1
%patch1 -p1
%build
# CentOS fails without this
mkdir -p m4
%configure --disable-static \
--with-pic
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
install -D -m 0644 %{sfxname}.m4 "%{buildroot}%{_datadir}/aclocal/%{sfxname}.m4"
mkdir -p %{buildroot}%{_datadir}/doc/%{name}
cp -r docs/%{docs} %{buildroot}%{_datadir}/doc/%{name}/
find %{buildroot}%{_datadir}/doc -type f -executable \
-exec chmod 644 {} \; || :
%post -n lib%{tarname}-x11-%{major}_%{minor}-%{soname} -p /sbin/ldconfig
%postun -n lib%{tarname}-x11-%{major}_%{minor}-%{soname} -p /sbin/ldconfig
%files -n lib%{tarname}-x11-%{major}_%{minor}-%{soname}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README
%{_libdir}/*%{tarname}-x11-%{major}.%{minor}.so.*
%files doc
%defattr(0644,root,root,0755)
%doc docs/COPYING docs/HELP docs/README docs/TODO docs/VERSION docs/*ChangeLog
%dir %{_datadir}/doc/%{name}
%doc %{_datadir}/doc/%{name}/*
%doc %{_datadir}/gtk-doc/html/%{tarname}
%files devel
%defattr(-,root,root)
%{_includedir}/%{sfxname}
%{_libdir}/*%{tarname}-x11-%{major}.%{minor}.so
%{_libdir}/pkgconfig/%{sfxname}.pc
%{_datadir}/aclocal/%{sfxname}.m4
%exclude %{_libdir}/*%{tarname}-x11-%{major}.%{minor}.la
%changelog