File doomsday.spec of Package doomsday
#
# spec file for package doomsday
#
# Copyright (c) 2015 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: doomsday
Version: 1.14.5
Release: 0
%define rver 1.14.5
Summary: The Doomsday Engine: DOOM/Hertic/Hexen port with pretty graphics
License: GPL-2.0+ and GPL-2.0
Group: Amusements/Games/3D/Shoot
# md2tool is the one being GPL-2.0-only
Url: http://dengine.net/
#Git-Web: https://github.com/skyjake/Doomsday-Engine
#Git-Clone: git://github.com/skyjake/Doomsday-Engine
Source: http://downloads.sf.net/deng/%name-%rver.tar.gz
Source2: %name-rpmlintrc
Patch1: doomsday-no-abs-icon.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: Mesa-devel
BuildRequires: SDL-devel
BuildRequires: SDL_mixer-devel
BuildRequires: gcc-c++
BuildRequires: libpng-devel
BuildRequires: libqt4-devel >= 4.6
BuildRequires: ncurses-devel
BuildRequires: xorg-x11-devel
BuildRequires: zlib-devel
%if 0%{?suse_version}
Recommends: timidity timidity-eawpats
%endif
Provides: jdoom = %version-%release
Provides: jheretic = %version-%release
Provides: jhexen = %version-%release
Obsoletes: deng < %version-%release
Provides: deng = %version-%release
# Doomsday 1.12 needs OpenGL 2.x, which Mesa 9.0 (as shipped in openSUSE 12.3)
# does not have.
# For the situation in openSUSE 13.1+, as far as RPM is concerned, 3rd party
# GL drivers can coexist with Mesa-libGL1 as they are located in a separate
# directory, which means that having the following Mesa require is always
# acceptable.
Requires: Mesa-libGL1 >= 9.2
%description
The Doomsday Engine is a source port with support for Doom, Heretic,
and Hexen. It does not support BOOM extensions.
%package launcher
Summary: Graphical launcher for Doomsday
Group: Amusements/Games/3D/Shoot
Requires: %name = %version
%if 0%{?fedora_version}
BuildRequires: python
Requires: wxPython
%else
%py_requires
Requires: python-wxWidgets
%endif
%if 0%{?suse_version} >= 1130 || 0%{?fedora_version}
BuildArch: noarch
%endif
%description launcher
Snowberry is the official frontend of the Doomsday Engine. It is a
portable graphical game launcher, with support for configuring the
various types of games supported by Doomsday. It offers to save your
settings for launching a particular game (e.g., Doom).
%prep
%setup -qn %name-%rver
%patch -P 1 -p1
%build
pushd doomsday;
find . -type f -name "*.h" -exec perl -i -pe 's{__DATE__}{""}gs' "{}" "+";
%if 0%{?fedora_version}
alias qmake="qmake-qt4";
%endif
qmake QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags" \
QMAKE_STRIP="true" DENG_LIB_DIR="%_libdir";
make %{?_smp_mflags};
popd;
%install
b="%buildroot";
pushd doomsday/;
make install INSTALL_ROOT="$b";
mkdir -p "$b/%_libexecdir/%name";
mv "$b/%_bindir"/{md2tool,savegametool,texc} "$b/%_libexecdir/%name/";
popd;
# Prepare for the icons
mkdir -p "$b/%_datadir/pixmaps"
cp snowberry/graphics/snowberry.png "$b/%_datadir/pixmaps/doomsday-snowberry.png"
cp doomsday/tools/shell/shell-gui/res/shell.png "$b/%_datadir/pixmaps/doomsday-shell.png"
mkdir -p "$b/%_sysconfdir/doomsday";
cat >"$b/%_sysconfdir/doomsday/paths" <<-EOF
basedir: %_datadir/doomsday
libdir: %_libdir/doomsday
iwaddir: %_datadir/doom
EOF
%post
echo "INFO: %name: The global IWAD directory is %_datadir/doom.";
/sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%dir %_sysconfdir/doomsday
%config %_sysconfdir/doomsday/paths
%_bindir/doomsday*
%_libdir/libdeng*.so*
%_libdir/%name/
%dir %_datadir/%name/
%_datadir/%name/data/
%_datadir/%name/icons/
%_datadir/%name/modules/
%_datadir/applications/*.desktop
%_datadir/pixmaps/doomsday-*.png
%_mandir/man6/doomsday*.6*
%_libexecdir/%name/
%files launcher
%defattr(-,root,root)
%_bindir/launch-doomsday
%dir %_datadir/%name/
%_datadir/%name/snowberry
%changelog