LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File freeciv.spec of Package freeciv-trunk (Project home:syntron:freeciv)

#
# spec file for package freeciv (Version 2.6.svn)
#
# Copyright (c) 2008 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/
#

# norootforbuild

Name:           freeciv
BuildRequires:  automake libtool
BuildRequires:  fdupes
BuildRequires:  gcc-c++
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
# devel packages
BuildRequires:  audiofile-devel
BuildRequires:  glibc-devel
BuildRequires:  imlib2-devel
BuildRequires:  libbz2-devel
BuildRequires:  libcurl-devel
BuildRequires:  python-devel
BuildRequires:  readline-devel
BuildRequires:  xz-devel
BuildRequires:  zlib-devel
BuildRequires:  lua-devel
# sound
BuildRequires:  SDL_mixer-devel
# sdl client
BuildRequires:  SDL-devel SDL_image-devel freetype2-devel libSDL_ttf-devel libwebp-devel
# sdl2 client
#BuildRequires:  libSDL2-devel libSDL2_gfx-devel libSDL2_image-devel libSDL2_mixer-devel libSDL2_ttf-devel
# gtk2 client
BuildRequires:  gtk2-devel
# gtk3 client
%if 0%{?suse_version} > 1210
BuildRequires:  gtk3-devel
%endif
# qt client deactivated
#BuildRequires:  libqt4-devel
#BuildRequires:  libQt5Declarative-devel libqt5-qttools-devel
# Xaw client depencies
#BuildRequires:  xaw3d-devel xorg-x11-devel xorg-x11-libXpm-devel
# fcdb
BuildRequires:  libmysqlclient-devel
BuildRequires:  sqlite3-devel
BuildRequires:  postgresql-devel
# mapimg
BuildRequires:  ImageMagick-devel
BuildRequires:  SDL_gfx-devel
PreReq:         update-alternatives
Url:            http://www.freeciv.org
License:        GPL-2.0+
Group:          Amusements/Games/Strategy/Turn Based
AutoReqProv:    on
Summary:        Free Civilization Clone
Version:        2.6.svn.21600
Release:        1
Source0:        %{name}-%{version}.tar.bz2
#Patch1:         freeciv-no-nb.diff
#Patch2:         freeciv-lua_libm.diff
#Patch3:          freeciv-LuasqlBase-4.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

To start a new game, first start the server 'freeciv-server,' then
start the client 'freeciv-gtk2'. Have fun!

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package server
Summary:        Freeciv server
Requires:       libfreeciv-srv0 = %{version}
Requires:       libfreeciv0 = %{version}
Requires:       %{name}-locale-core = %{version}
Requires:       %{name}-aimodules = %{version}
Requires:       %{name}-data-server = %{version}
Recommends:     %{name}-doc = %{version}
Recommends:     %{name}-locale-nations = %{version}
Recommends:     %{name}-locale-ruledit = %{version}

%description server
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Server part of game. Needed to host server or to play against computer.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package -n libfreeciv-srv0
Summary:        Freeciv server library

%description -n libfreeciv-srv0
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Library needed to run the Freeciv server

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package -n libfreeciv-srv0-devel
Summary:        Development package for Freeciv server library
Group:          Development/Libraries/Other
Requires:       libfreeciv-srv0 = %{version}
Requires:       glibc-devel
Requires:       libcurl-devel

%description -n libfreeciv-srv0-devel
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Developer files for Freeciv server library.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package manual
Summary:        Freeciv manual
Requires:       libfreeciv0 = %{version}
Requires:       %{name}-locale-core = %{version}
Requires:       %{name}-data-server = %{version}

%description manual
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Freeciv manual.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package modpack
Summary:        Freeciv modpack
Requires:       libfreeciv0 = %{version}
Requires:       %{name}-locale-core = %{version}

%description modpack
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Freeciv modpack downloader.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package locale-core
Summary:        Language package for Freeciv (core)
Buildarch:      noarch
Obsoletes:      freeciv-locale

%description locale-core
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Language data for the game.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package locale-nations
Summary:        Language package for Freeciv (nation files)
Buildarch:      noarch

%description locale-nations
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Language data for the game.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package locale-ruledit
Summary:        Language package for Freeciv (ruledit files)
Buildarch:      noarch

%description locale-ruledit
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Language data for the game.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package -n libfreeciv0
Summary:        Freeciv lib

%description -n libfreeciv0
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Common library of the game.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package -n libfreeciv0-devel
Summary:        Development package for Freeciv lib
Group:          Development/Libraries/Other
Requires:       libfreeciv0 = %{version}
Requires:       glibc-devel
Requires:       libbz2-devel
Requires:       libcurl-devel
Requires:       xz-devel
Requires:       zlib-devel

%description -n libfreeciv0-devel
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Development files for Freeciv lib.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package aimodules
Summary:        Freeciv ai modules
Requires:       libfreeciv-srv0 = %{version}

%description aimodules
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

AI modules.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package aimodules-devel
Summary:        Development package for Freeciv ai modules
Group:          Development/Libraries/Other
Requires:       %{name}-aimodules = %{version}

%description aimodules-devel
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Development files for AI modules.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package data-server
Summary:        Freeciv data (server: rulesets)
Buildarch:      noarch

%description data-server
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Data needed by the server (rulesets).

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package data-client
Summary:        Freeciv data (client: tilesets)
Buildarch:      noarch

%description data-client
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Data needed by all clients (tilesets).

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package data-sounds
Summary:        Freeciv data (sounds)
Buildarch:      noarch

%description data-sounds
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Sound files needed by all clients.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package doc
Summary:        Freeciv doc
Buildarch:      noarch

%description doc
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Documentation for Freeciv.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%package client-gtk2
Summary:        Freeciv game client using GTK2 toolkit
Requires:       libfreeciv0 = %{version}
Requires:       %{name}-locale-core = %{version}
Requires:       %{name}-data-client = %{version}
Recommends:     %{name}-data-sound = %{version}
Recommends:     %{name}-doc = %{version}
Recommends:     %{name}-server = %{version}
Recommends:     %{name}-locale-nations = %{version}
Recommends:     %{name}-locale-ruledit = %{version}

%description client-gtk2
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Gtk2 client - Most used Freeciv game client. Needed to play.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>

# ---------------------------------------------------------------------------
%if 0%{?suse_version} > 1210
%package client-gtk3
Summary:        Freeciv game client using GTK3 toolkit
Requires:       libfreeciv0 = %{version}
Requires:       %{name}-locale-core = %{version}
Requires:       %{name}-data-client = %{version}
# needed as some files are shared between gtk2 and gtk3
Requires:       %{name}-client-gtk2 = %{version}
Recommends:     %{name}-data-sound = %{version}
Recommends:     %{name}-doc = %{version}
Recommends:     %{name}-server = %{version}
Recommends:     %{name}-locale-nations = %{version}
Recommends:     %{name}-locale-ruledit = %{version}

%description client-gtk3
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Gtk3 client (development; not playable).

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>
%endif

# ---------------------------------------------------------------------------
# qt client deactivated
%if 0%{?suse_version} > 1410
%package client-qt
Summary:        Freeciv game client using QT toolkit
Requires:       libfreeciv0 = %{version}
Requires:       %{name}-locale-core = %{version}
Requires:       %{name}-data-client = %{version}
Recommends:     %{name}-data-sound = %{version}
Recommends:     %{name}-doc = %{version}
Recommends:     %{name}-server = %{version}
Recommends:     %{name}-locale-nations = %{version}
Recommends:     %{name}-locale-ruledit = %{version}

%description client-qt
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

Qt client (development; not playable).

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>
%endif

# ---------------------------------------------------------------------------
%if 0%{?suse_version} > 1410
%package client-sdl2
Summary:        Freeciv game client using SDL2 toolkit
Requires:       libfreeciv0 = %{version}
Requires:       %{name}-locale-core = %{version}
Requires:       %{name}-data-client = %{version}
Recommends:     %{name}-data-sound = %{version}
Recommends:     %{name}-doc = %{version}
Recommends:     %{name}-server = %{version}
Recommends:     %{name}-locale-nations = %{version}
Recommends:     %{name}-locale-ruledit = %{version}

%description client-sdl2
A clone of the well known game Civilization by Microprose.

Every player is the leader of an imaginary nation. The aim of the game
can be to create a prospering civilization with commerce and knowledge
exchange or (more often) the extinction of all other civilizations.

SDL2 client.

This version shows the state of development for the 3.0.0 release (trunk).

Authors:
--------
    Allan Ove Kjeldbjerg <allan@daimi.aau.dk>
    Claus Leth Gregersen <leth@daimi.aau.dk>
    Peter Joachim Unold  <pjunold@daimi.aau.dk>
%endif

%prep
%setup -q -n %{name}-%{version}
#%patch1
#%patch2
#%patch3 -p1

echo "X-SuSE-translate=false" >> bootstrap/freeciv-server.desktop.in
echo "X-SuSE-translate=false" >> bootstrap/freeciv-modpack.desktop.in

%build
# qt client deactivated
#  --enable-client=gtk2,qt,sdl,xaw \
#  --enable-client=gtk2,gtk3,qt,sdl,xaw \
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" ./autogen.sh \
  --prefix=/usr \
  --libdir=%{_libdir} \
  --datadir=/usr/share \
  --sysconfdir=/usr/share \
  --datarootdir=/usr/share \
  --localedir=/usr/share/locale \
  --mandir=%{_mandir} \
  --enable-aimodules=experimental \
%if 0%{?suse_version} <= 1210
  --enable-client=gtk2 \
%endif
%if 0%{?suse_version} > 1210
  --enable-client=gtk3 \
%endif
  --enable-debug=yes \
  --enable-mapimg=auto \
  --enable-shared=yes \
  --enable-static=yes \
  --enable-fcdb=sqlite3,mysql \
  --with-readline
# postgres deactivated; original fcdb option:
#  --enable-fcdb=all \
# freeciv requires lua 5.3; opensuse provides only 5.2 => use internal lua
#  --enable-sys-lua \
make

%install
make install DESTDIR=$RPM_BUILD_ROOT
%if 0%{?suse_version}
%suse_update_desktop_file -i %name Game StrategyGame
%endif
rm -f $RPM_BUILD_ROOT/usr/share/applications/freecivserver.desktop
%if 0%{?suse_version} <= 1210
rm -f $RPM_BUILD_ROOT/usr/share/man/man6/freeciv-gtk3.6
%endif
rm -f $RPM_BUILD_ROOT/usr/share/man/man6/freeciv-win32.6
rm -f $RPM_BUILD_ROOT/usr/share/man/man6/freeciv-qt.6
# make rpmlint happy (doc directory)
find doc -name "Makefile*" | xargs rm -f
find doc -name "*.orig" | xargs rm -f
# man files are installed
rm -fr doc/man
# move documentation
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/freeciv
mv $RPM_BUILD_ROOT/usr/share/doc/freeciv/* $RPM_BUILD_ROOT/usr/share/doc/packages/freeciv
# sdl2 is not installed
%if 0%{?suse_version} < 1410
rm -f $RPM_BUILD_ROOT/usr/share/man/man6/freeciv-sdl2.6*
%endif

# get language files
#%find_lang %name
%find_lang freeciv-core
%find_lang freeciv-nations
%find_lang freeciv-ruledit
# check for duplicated files
%fdupes $RPM_BUILD_ROOT

# ---------------------------------------------------------------------------
%files server
%defattr(-,root,root)
%{_bindir}/freeciv-server
%{_bindir}/freeciv-ruleup
%{_datadir}/applications/freeciv-server.desktop
%{_datadir}/appdata/freeciv-server.appdata.xml
%{_datadir}/icons/hicolor/128x128/apps/freeciv-server.png
%{_datadir}/icons/hicolor/16x16/apps/freeciv-server.png
%{_datadir}/icons/hicolor/32x32/apps/freeciv-server.png
%{_datadir}/icons/hicolor/48x48/apps/freeciv-server.png
%{_datadir}/icons/hicolor/64x64/apps/freeciv-server.png
%doc %{_mandir}/man6/freeciv-server.6.gz

# ---------------------------------------------------------------------------
%files -n libfreeciv-srv0
%defattr(-,root,root)
%{_libdir}/libfreeciv-srv.so*

%post -n libfreeciv-srv0
/sbin/ldconfig

%postun -n libfreeciv-srv0
/sbin/ldconfig

# ---------------------------------------------------------------------------
%files -n libfreeciv-srv0-devel
%defattr(-,root,root)
%{_libdir}/libfreeciv-srv.a
%{_libdir}/libfreeciv-srv.la

# ---------------------------------------------------------------------------
%files manual
%defattr(-,root,root)
%{_bindir}/freeciv-manual
%{_mandir}/man6/freeciv-manual.6.gz

# ---------------------------------------------------------------------------
%files modpack
%defattr(-,root,root)
%{_bindir}/freeciv-mp-gtk3
%{_datadir}/applications/freeciv-mp-gtk3.desktop
%{_datadir}/icons/hicolor/128x128/apps/freeciv-modpack.png
%{_datadir}/icons/hicolor/16x16/apps/freeciv-modpack.png
%{_datadir}/icons/hicolor/32x32/apps/freeciv-modpack.png
%{_datadir}/icons/hicolor/48x48/apps/freeciv-modpack.png
%{_datadir}/icons/hicolor/64x64/apps/freeciv-modpack.png
%{_mandir}/man6/freeciv-modpack.6.gz
%{_datadir}/appdata/freeciv-mp-gtk3.appdata.xml
# check these files below ...
%{_mandir}/man6/freeciv-mp-cli.6.gz
#%{_mandir}/man6/freeciv-mp-gtk2.6.gz
%{_mandir}/man6/freeciv-mp-gtk3.6.gz
%{_mandir}/man6/freeciv-mp-qt.6.gz

# ---------------------------------------------------------------------------
%files locale-core -f freeciv-core.lang
%defattr(-,root,root)

# ---------------------------------------------------------------------------
%files locale-nations -f freeciv-nations.lang
%defattr(-,root,root)

# ---------------------------------------------------------------------------
%files locale-ruledit -f freeciv-ruledit.lang
%defattr(-,root,root)
%{_mandir}/man6/freeciv-ruledit.6.gz

# ---------------------------------------------------------------------------
%files -n libfreeciv0
%defattr(-,root,root)
%{_libdir}/libfreeciv.so*
# hack for build to work ...
%dir %{_datadir}/appdata/

%post -n libfreeciv0
/sbin/ldconfig

%postun -n libfreeciv0
/sbin/ldconfig

# ---------------------------------------------------------------------------
%files -n libfreeciv0-devel
%defattr(-,root,root)
%{_libdir}/libfreeciv.a
%{_libdir}/libfreeciv.la

# ---------------------------------------------------------------------------
%files aimodules
%defattr(-,root,root)
%dir %{_libdir}/fcai
%{_libdir}/fcai/fc_ai*.so*

%post aimodules
/sbin/ldconfig

%postun aimodules
/sbin/ldconfig

# ---------------------------------------------------------------------------
%files aimodules-devel
%defattr(-,root,root)
%{_libdir}/fcai/fc_ai*.a
%{_libdir}/fcai/fc_ai*.la

# ---------------------------------------------------------------------------
%files data-server
%defattr(-,root,root)
%dir %{_datadir}/freeciv/
%{_datadir}/freeciv/alien/
%{_datadir}/freeciv/alio/
%{_datadir}/freeciv/civ1/
%{_datadir}/freeciv/civ2/
%{_datadir}/freeciv/civ2civ3/
%{_datadir}/freeciv/classic/
%{_datadir}/freeciv/database.lua
%{_datadir}/freeciv/default/
%{_datadir}/freeciv/experimental/
%{_datadir}/freeciv/sandbox/
%{_datadir}/freeciv/hexemplio/
%{_datadir}/freeciv/multiplayer/
%{_datadir}/freeciv/nation/
#%{_datadir}/freeciv/sandbox/
%{_datadir}/freeciv/scenarios/
%{_datadir}/freeciv/*.serv
%dir %{_datadir}/freeciv/override/
%{_datadir}/freeciv/override/*.spec
%{_datadir}/freeciv/override/*.ruleset

# ---------------------------------------------------------------------------
%files data-client
%defattr(-,root,root)
%{_datadir}/applications/%name.desktop
%dir %{_datadir}/freeciv/
%{_datadir}/freeciv/amplio2/
%{_datadir}/freeciv/buildings/
%{_datadir}/freeciv/cimpletoon/
%{_datadir}/freeciv/flags/
%{_datadir}/freeciv/helpdata.txt
%{_datadir}/freeciv/hex2t/
%{_datadir}/freeciv/isophex/
%{_datadir}/freeciv/isotrident/
%{_datadir}/freeciv/misc/
%{_datadir}/freeciv/trident/
%{_datadir}/freeciv/wonders/
%{_datadir}/freeciv/*.tilespec
%{_datadir}/icons/hicolor/128x128/apps/freeciv-client.png
%{_datadir}/icons/hicolor/16x16/apps/freeciv-client.png
%{_datadir}/icons/hicolor/32x32/apps/freeciv-client.png
%{_datadir}/icons/hicolor/48x48/apps/freeciv-client.png
%{_datadir}/icons/hicolor/64x64/apps/freeciv-client.png
%{_datadir}/pixmaps/freeciv-client.png
%{_mandir}/man6/freeciv-client.6.gz

# ---------------------------------------------------------------------------
%files data-sounds
%defattr(-,root,root)
%dir %{_datadir}/freeciv/
%{_datadir}/freeciv/stdsounds/
%{_datadir}/freeciv/stdmusic/
%{_datadir}/freeciv/*.soundspec
%{_datadir}/freeciv/*.musicspec

# ---------------------------------------------------------------------------
%files doc
%defattr(-,root,root)
%{_docdir}/freeciv/

# ---------------------------------------------------------------------------
%files client-gtk2
%defattr(-,root,root)
%{_bindir}/freeciv-gtk2
%dir %{_datadir}/freeciv/
#%{_datadir}/freeciv/Freeciv
%{_datadir}/freeciv/freeciv.rc-2.0
%{_datadir}/freeciv/gtk2_menus.xml
%dir %{_datadir}/freeciv/themes
%{_datadir}/freeciv/themes/gui-gtk-2.0/
%{_mandir}/man6/freeciv-gtk2.6.gz
%{_mandir}/man6/freeciv-gtk3.22.6.gz
%{_datadir}/applications/freeciv-gtk2.desktop
%{_datadir}/appdata/freeciv-gtk2.appdata.xml

%post client-gtk2
/usr/sbin/update-alternatives --install \
  %{_bindir}/freeciv-client \
  %name-client \
  %{_bindir}/freeciv-gtk2 \
  30

%preun client-gtk2
[ $1 = 0 ] || exit 0
/usr/sbin/update-alternatives --remove \
  %name-client \
  %{_bindir}/freeciv-gtk2


# ---------------------------------------------------------------------------
%if 0%{?suse_version} > 1210
%files client-gtk3
%defattr(-,root,root)
%{_bindir}/freeciv-gtk3
# additional files provided by freeciv-gtk2:
#{_datadir}/freeciv/Freeciv
#{_datadir}/freeciv/freeciv.rc-2.0
%{_datadir}/freeciv/gtk3_menus.xml
%dir %{_datadir}/freeciv/themes
%{_datadir}/freeciv/themes/gui-gtk-3.0/
%{_mandir}/man6/freeciv-gtk3.6.gz
%{_datadir}/appdata/freeciv-gtk3.appdata.xml
%endif

# ---------------------------------------------------------------------------
# qt client deactivated
%if 0%{?suse_version} > 1410
%files client-qt
%defattr(-,root,root)
%{_bindir}/freeciv-qt
%{_mandir}/man6/freeciv-qt.6.gz
%endif

# ---------------------------------------------------------------------------
%if 0%{?suse_version} > 1410
%files client-sdl2
%defattr(-,root,root)
%{_bindir}/freeciv-sdl2
%dir %{_datadir}/freeciv/themes
%{_datadir}/freeciv/themes/gui-sdl2/
%{_mandir}/man6/freeciv-sdl2.6.gz
%{_datadir}/applications/freeciv-sdl2.desktop
%{_datadir}/appdata/freeciv-sdl2.appdata.xml
%{_mandir}/man6/freeciv-sdl2.6.gz

%post client-sdl2
/usr/sbin/update-alternatives --install \
  %{_bindir}/freeciv-client \
  %name-client \
  %{_bindir}/freeciv-sdl2 \
  20

%preun client-sdl2
[ $1 = 0 ] || exit 0
/usr/sbin/update-alternatives --remove \
  %name-client \
  %{_bindir}/freeciv-sdl2
%endif

%changelog