File t4k_common.spec of Package t4k_common

#
# spec file for package t4k_common
#
# Copyright (c) 2013 Lars Vogdt <lars@linux-schulserver.de>
#
# 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:           t4k_common
Version:        0.1.1
Release:        1
License:        GPL-3.0+
Summary:        Tux4Kids common routines
Url:            http://tux4kids.alioth.debian.org/
Group:          Amusements/Teaching/Other
## https://alioth.debian.org/frs/?group_id=31080
Source0:        %name-%version.tar.bz2
Patch0:         %name-%version-libpng.patch
Patch1:         t4k_common-c99.patch
Patch2:         pointer-types.patch
BuildRequires:  ImageMagick
BuildRequires:  SDL-devel
BuildRequires:  SDL_Pango-devel
BuildRequires:  SDL_image-devel >= 1.2.2
BuildRequires:  SDL_mixer-devel
BuildRequires:  SDL_net-devel
BuildRequires:  SDL_ttf-devel > 2.0.8
Requires:       libt4k_common0 = %version
%if 0%{?suse_version}
BuildRequires:  fdupes
BuildRequires:  librsvg-devel
BuildRequires:  libxml2-devel
%endif
%if 0%{?fedora_version}
BuildRequires:  librsvg2-devel
BuildRequires:  libxml2-devel
%endif
%if 0%{?mandriva_version}
BuildRequires:  librsvg-devel
%endif
%if 0%{?mandriva_version} >= 2009
BuildRequires:  pulseaudio-esound-compat
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Library of code shared between tuxmath and tuxtype.

%package -n libt4k_common0
License:        GPLv3+
Summary:        Shared Library between tuxmath and tuxtype
Group:          System/Libraries

%description -n libt4k_common0
This package contains the shared library used between tuxmath
and tuxtype.

%package devel
License:        GPLv3+
Summary:        Development files for t4k_common
Group:          Development/Libraries/C and C++
Requires:       %name = %version

%description devel
This package contains header and pkg-config files for
development.

%prep
%setup -q
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 2 -p0

%build
export CFLAGS="%{optflags} -fcommon -std=gnu11"
%configure --disable-rpath \
%if 0%{?suse_version} <= 01110
           --without-rsvg \
%endif
           --disable-static

%install
%makeinstall
rm %{buildroot}%{_libdir}/libt4k_common.la

%clean
rm -rf %{buildroot}

%post -n libt4k_common0 -p /sbin/ldconfig

%postun -n libt4k_common0 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc ABOUT-NLS COPYING README
%{_datadir}/%name/

%files -n libt4k_common0
%defattr(-,root,root)
%doc COPYING
%{_libdir}/libt4k_common.so.*

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

%changelog
openSUSE Build Service is sponsored by