File guichan.spec of Package guichan
#
# spec file for package guichan
#
# 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/
#
Name: guichan
# FIXME - Provides/Obsoletes will vanish at some point
Version: 0.8.2
Release: 0
# guichan has an awkward scheme... the LTRELEASE always ends in .1
# (e.g. 0.8.1) even if the %version is larger (0.8.2).
%define lname libguichan-0_8_1-1
Summary: Portable C++ GUI library for games using Allegro, SDL and OpenGL
License: BSD-3-Clause
Group: Development/Tools/GUI Builders
Url: http://guichan.sourceforge.net
Source0: http://guichan.googlecode.com/files/%{name}-%{version}.tar.gz
Patch0: libguichan-0_8_1-1-0.8.1-missing_DTNEEDED.patch
Patch1: libguichan-0_8_1-1-0.8.1-10_3.patch
# OPENSUSE-FIX-UPSTREAM guichan-upstream-90c8966.patch -- Upstream 90c8966
# avoids conflicts with higher character codes for keys. Fixes UTF8
Patch10: %{name}-upstream-90c8966.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Obsoletes: libguichan-0_8_1-1 =< 0.8.1
Provides: libguichan-0_8_1-1 = 0.8.2
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
# Moving to pkgconfig() breaks SLE11 builds
BuildRequires: Mesa-devel
BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: gcc-c++
BuildRequires: liballeg-devel
%description
Guichan is a small, efficient C++ GUI library designed for games. It comes
with a standard set of widgets and can use several different objects for
displaying graphics and grabbing user input.
%package -n %lname
Summary: Guichan system shared libraries
Group: Development/Tools/GUI Builders
%description -n %lname
Guichan is a small, efficient C++ GUI library designed for games. It comes
with a standard set of widgets and can use several different objects for
displaying graphics and grabbing user input.
%package devel
Summary: Development files for guichan development
Group: Development/Tools/GUI Builders
Requires: %lname = %version
Obsoletes: libguichan-0_8_1-devel <= 0.8.1
Provides: libguichan-0_8_1-devel = 0.8.2
%description devel
This package includes header and libraries files for development using
guichan, a small and efficient C++ GUI library designed for games. This
package is needed to build programs written using guichan.
%prep
%setup -q
%patch0
%if 0%{?suse_version} < 1100
%patch1
%endif
# UTF-8
%patch10 -p1
%build
NOCONFIGURE=1 autoreconf -fi
%configure --disable-static
make %{?_smp_mflags}
%install
%make_install
# Removing Libtool archives
find %{buildroot}%{_libdir} -type f -name "*.la" -delete -print
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root)
%doc AUTHORS COPYING
%{_libdir}/*.so.1*
%files devel
%defattr(-,root,root)
%doc ChangeLog TODO README NEWS
%{_includedir}/%{name}/
%{_includedir}/guichan.hpp
%{_libdir}/*.so
%{_libdir}/pkgconfig/guichan-0.8.pc
%{_libdir}/pkgconfig/guichan_opengl-0.8.pc
%{_libdir}/pkgconfig/guichan_sdl-0.8.pc
%changelog