A new user interface for you! Read more...

File freeciv.spec of Package freeciv-2.4.3

#
# spec file for package freeciv (Version 2.4.3)
#
# 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
# sound
BuildRequires:  SDL_mixer-devel
# sdl client
BuildRequires:  SDL-devel SDL_image-devel freetype2-devel
# gtk2 client
BuildRequires:  gtk2-devel
# gtk3 client
%if 0%{?suse_version} > 1210
BuildRequires:  gtk3-devel
%endif
# qt client
BuildRequires:  libqt4-devel
# Xaw client depencies
BuildRequires:  xaw3d-devel xorg-x11-devel xorg-x11-libXpm-devel
# fcdb
BuildRequires:  libmysqlclient-devel postgresql-devel sqlite3-devel
# mapimg
BuildRequires:  ImageMagick-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.4.3
Release:        1
Source0:        %{name}-%{version}.tar.bz2
#Patch1:         freeciv-no-nb.diff
#Patch2:         freeciv-lua_libm.diff

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 2.4.3 release (version 2.4.3).

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 = %{version}
Requires:       %{name}-aimodules = %{version}
Requires:       %{name}-data-server = %{version}
Recommends:     %{name}-doc = %{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 2.4.3 release (version 2.4.3).

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 2.4.3 release (version 2.4.3).

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 2.4.3 release (version 2.4.3).

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 = %{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 2.4.3 release (version 2.4.3).

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 = %{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 2.4.3 release (version 2.4.3).

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

# ---------------------------------------------------------------------------
%package locale
Summary:        Language package for Freeciv
Buildarch:      noarch

%description locale
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 2.4.3 release (version 2.4.3).

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 2.4.3 release (version 2.4.3).

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 2.4.3 release (version 2.4.3).

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 2.4.3 release (version 2.4.3).

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 2.4.3 release (version 2.4.3).

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 2.4.3 release (version 2.4.3).

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 2.4.3 release (version 2.4.3).

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 2.4.3 release (version 2.4.3).

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 2.4.3 release (version 2.4.3).

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 = %{version}
Requires:       %{name}-data-client = %{version}
Recommends:     %{name}-data-sound = %{version}
Recommends:     %{name}-doc = %{version}
Recommends:     %{name}-server = %{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 2.4.3 release (version 2.4.3).

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 = %{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}

%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 2.4.3 release (version 2.4.3).

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

# ---------------------------------------------------------------------------
%package client-xaw
Summary:        Freeciv game client using Xaw3D toolkit
Requires:       libfreeciv0 = %{version}
Requires:       %{name}-locale = %{version}
Requires:       %{name}-data-client = %{version}
Recommends:     %{name}-data-sound = %{version}
Recommends:     %{name}-doc = %{version}
Recommends:     %{name}-server = %{version}

%description client-xaw
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.

Xaw client.

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

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

# ---------------------------------------------------------------------------
%package client-qt
Summary:        Freeciv game client using QT toolkit
Requires:       libfreeciv0 = %{version}
Requires:       %{name}-locale = %{version}
Requires:       %{name}-data-client = %{version}
Recommends:     %{name}-data-sound = %{version}
Recommends:     %{name}-doc = %{version}
Recommends:     %{name}-server = %{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 2.4.3 release (version 2.4.3).

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

# ---------------------------------------------------------------------------
%package client-sdl
Summary:        Freeciv game client using SDL toolkit
Requires:       libfreeciv0 = %{version}
Requires:       %{name}-locale = %{version}
Requires:       %{name}-data-client = %{version}
Recommends:     %{name}-data-sound = %{version}
Recommends:     %{name}-doc = %{version}
Recommends:     %{name}-server = %{version}

%description client-sdl
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.

SDL client.

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

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

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

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

%build
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,qt,sdl,xaw \
%endif
%if 0%{?suse_version} > 1210
  --enable-client=gtk2,gtk3,qt,sdl,xaw \
%endif
  --enable-debug=yes \
  --enable-fcdb=all \
  --enable-mapimg=auto \
  --enable-shared=yes \
  --enable-static=yes \
  --with-readline \
  --with-xaw3d
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
# 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
rm -f $RPM_BUILD_ROOT/usr/share/doc/freeciv/INSTALL
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
# get language files
%find_lang %name
# check for duplicated files
%fdupes $RPM_BUILD_ROOT

# ---------------------------------------------------------------------------
%files server
%defattr(-,root,root)
%{_bindir}/freeciv-server
%{_datadir}/applications/freeciv-server.desktop
%{_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
%{_datadir}/appdata/freeciv-server.appdata.xml

# ---------------------------------------------------------------------------
%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-modpack
%{_datadir}/applications/freeciv-modpack.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-modpack.appdata.xml

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

# ---------------------------------------------------------------------------
%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/civ1/
%{_datadir}/freeciv/civ2/
%{_datadir}/freeciv/database.lua
%{_datadir}/freeciv/default/
%{_datadir}/freeciv/experimental/
%{_datadir}/freeciv/multiplayer/
%{_datadir}/freeciv/nation/
%{_datadir}/freeciv/scenarios/
%{_datadir}/freeciv/*.serv

# ---------------------------------------------------------------------------
%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/*.soundspec

# ---------------------------------------------------------------------------
%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/gtk_menus.xml
%dir %{_datadir}/freeciv/themes
%{_datadir}/freeciv/themes/gui-gtk-2.0/
%{_mandir}/man6/freeciv-gtk2.6.gz
%{_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-xaw

# ---------------------------------------------------------------------------
%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/gtk_menus.xml
%dir %{_datadir}/freeciv/themes
%{_datadir}/freeciv/themes/gui-gtk-3.0/
%{_mandir}/man6/freeciv-gtk3.6.gz
%{_datadir}/applications/freeciv-gtk3.desktop
%{_datadir}/appdata/freeciv-gtk3.appdata.xml
%endif

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

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

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

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

# ---------------------------------------------------------------------------
%files client-sdl
%defattr(-,root,root)
%{_bindir}/freeciv-sdl
%dir %{_datadir}/freeciv/themes
%{_datadir}/freeciv/themes/gui-sdl/
%{_mandir}/man6/freeciv-sdl.6.gz
%{_datadir}/applications/freeciv-sdl.desktop
%{_datadir}/appdata/freeciv-sdl.appdata.xml

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

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

%changelog