File blobwars.spec of Package blobwars

# spec file for package blobwars
# 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

Name:           blobwars
Version:        2.00
Release:        0
Summary:        Mission and Objective based 2D Platform Game
License:        GPL-2.0+
Group:          Amusements/Games/Action/Arcade
Source1:        %{name}.appdata.xml
# PATCH-FIX-OPENSUSE - blobwars-icons_blobwars.desktop.patch -- Add GenericName and Category
Patch0:         %{name}-icons_blobwars.desktop.patch
Patch1:         reproducible.patch
%if 0%{?suse_version}
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  pkgconfig
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig(SDL2_image)
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(SDL2_net)
BuildRequires:  pkgconfig(SDL2_ttf)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Blob Wars : Metal Blob Solid. This is Episode I of the Blob Wars Saga.
This is a platform game, not unlike those found on the Amiga and SNES.
The object of the game is to take on the role of solider Blob, Bob,
and play through the various levels and attempt to rescue as many MIA
(Missing In Action) Blobs as possible. This is not quite as straight
forward as it sounds, since the MIAs will often be not directly
reachable and will require some extra thought. Bob also has to
contend with environmental hazards, alien invaders and assimilated Blobs.


%setup -q
%patch1 -p1

# Correct Permissions
chmod 0644 Makefile*

# SED-FIX-OPENSUSE -- Fix paths and libraries
sed -i -e 's|USEPAK ?= 0|USEPAK ?= 1|;
           s| -Werror||;
           s|$(CXX) $(LIBS) $(GAMEOBJS) -o $(PROG)|$(CXX) $(GAMEOBJS) $(LIBS) -o $(PROG)|;
           s|$(CXX) $(LIBS) $(PAKOBJS) -o pak|$(CXX) $(PAKOBJS) $(LIBS) -o pak|;
           s|$(CXX) $(LIBS) $(MAPOBJS) -o mapeditor|$(CXX) $(MAPOBJS) $(LIBS) -o mapeditor|' Makefile

sed -i -e 's|gzclose(pak)|gzclose((gzFile)pak)|;
           s|gzclose(fp)|gzclose((gzFile)fp)|' src/pak.cpp

make %{?_smp_mflags} CFLAGS="%{optflags}" \
     RELEASE=1 DOCDIR=%{_docdir}/%{name}/

#make install
%make_install BINDIR=%{_bindir}/ DATADIR=%{_datadir}/%{name}/ DOCDIR=%{_docdir}/%{name}/

# install icons
for i in 16 32 48 64; do
    install -Dm 0644 icons/%{name}${i}x${i}.png \

%find_lang %{name}

# Install appdata
mkdir -p %{buildroot}%{_datadir}/appdata
install -Dm 0644 %{S:1} %{buildroot}%{_datadir}/appdata

%if 0%{?suse_version}
    %suse_update_desktop_file %{name}

%doc doc/*
%dir %{_datadir}/appdata

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by