File gemrb.spec of Package gemrb

#
# spec file for package gemrb
#
# Copyright (c) 2016 SUSE LINUX 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:           gemrb
Version:        0.8.4
Release:        0
Summary:        Game engine made with pre-Rendered Background
License:        GPL-2.0+
Group:          Amusements/Games/RPG
Url:            http://www.gemrb.org/
Source:         https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  glibc-devel
BuildRequires:  libSDL_ttf-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(SDL_mixer)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(libvlc)
BuildRequires:  pkgconfig(openal)
BuildRequires:  pkgconfig(python) >= 2.3
BuildRequires:  pkgconfig(sdl) >= 1.2
BuildRequires:  pkgconfig(vorbis)
BuildRequires:  pkgconfig(zlib)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
GemRB is a portable open-source implementation of Bioware's Infinity
Engine which was written to support pseudo-3D role playing games based
on the Dungeons & Dragons ruleset.

You will need the original game files of Baldur's Gate and the Icewind
Dale series or Planescape: Torment to play.

%prep
%setup -q

%build
# FIXME: you should use %%cmake macros
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
    -DLIB_DIR=%{_libdir}/gemrb \
    -DDISABLE_WERROR=1 \
    -DCMAKE_C_FLAGS:STRING="%{optflags}" \
    -DCMAKE_CXX_FLAGS:STRING="%{optflags}" \
    -DCMAKE_VERBOSE_MAKEFILE:BOOL="true" \
     ..
make %{?_smp_mflags}

%install
%cmake_install 
%fdupes -s %{buildroot}/%{_datadir}/gemrb
rm %{buildroot}/%{_datadir}/doc/gemrb/INSTALL

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(644,root,root)
%attr(755,root,root) %{_bindir}/gemrb
%attr(755,root,root) %{_bindir}/extend2da.py
%{_libdir}/gemrb/
%{_libdir}/gemrb/plugins/
%{_mandir}/man6/gemrb.6%{ext_man}
%{_datadir}/gemrb/
%{_datadir}/doc/gemrb/
%{_datadir}/pixmaps/gemrb.png
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/gemrb.svg
%{_datadir}/applications/gemrb.desktop

%config %{_sysconfdir}/gemrb/

%changelog
openSUSE Build Service is sponsored by