SHA256
1
0
forked from pool/freeciv

Accepting request 291034 from home:adrianSuSE:branches:games

- update to version 2.5.0
- switch to non-ancient UI libs (qt and gtk3)
  => two extra subpackages to have the choice
- fix moc-qt5 detection

OBS-URL: https://build.opensuse.org/request/show/291034
OBS-URL: https://build.opensuse.org/package/show/games/freeciv?expand=0&rev=29
This commit is contained in:
Dirk Stoecker 2015-03-16 16:18:52 +00:00 committed by Git OBS Bridge
parent 2f23a7bd76
commit 92e2ad0c71
7 changed files with 151 additions and 19 deletions

13
fix-qt5-detection.patch Normal file
View File

@ -0,0 +1,13 @@
--- m4/qt5.m4.orig 2015-03-16 15:29:47.800729769 +0100
+++ m4/qt5.m4 2015-03-16 15:41:35.044747937 +0100
@@ -114,8 +114,8 @@
dnl If $1 is Qt 5's moc command then $2 else $3
AC_DEFUN([FC_QT5_IF_QT5_MOC],
- AS_IF([test "`$1 -v 2<&1 | grep -o 'Qt [[[0-9]]]\+'`" = "Qt 5" ||
- test "`$1 -v 2<&1 | grep -o 'moc [[[0-9]]]\+'`" = "moc 5" ],
+ AS_IF([test "`$1 -v 2<&1 | grep -o 'Qt 5\+'`" = "Qt 5" ||
+ test "`$1 -v 2<&1 | grep -o $1' 5\+'`" = "$1 5" ],
[$2], [$3]))
dnl Set MOCCMD to $1 if it is the Qt 5 "moc". If not run $2 parameter.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8307fc9d69571b031ccc465e8029d8a7ea3dbef4e3651f2de07356aba931e2a3
size 38847925

3
freeciv-2.5.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bd9f7523ea79b8d2806d0c1844a9f48506ccd18276330580319913c43051210b
size 40323793

View File

@ -64,7 +64,7 @@ GenericName[xh]=Indlela ethile Yomdlalo
GenericName[zh_CN]=
GenericName[zh_TW]=
GenericName[zu]=Umdlalo weplani
Exec=freeciv-gtk2
Exec=freeciv-gtk3
Icon=freeciv
Path=
Terminal=false

72
freeciv-qt.desktop Normal file
View File

@ -0,0 +1,72 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Freeciv
Name[be]=Свабодная Цывілізацыя
Name[bg]=Цивилизация
Name[eo]=Libera Civilizludo
Name[fa]=تمدنآزاد
Name[nso]=civ yeo e lokollogilego
Name[sv]=Friciv
Name[ven]=civ ya Mahala
Name[vi]=Freeciv
Name[zh_CN]=
Name[zh_TW]=Freeciv 仿
Type=Application
GenericName=Strategy Game
GenericName[af]=Strategie Speletjie
GenericName[be]=Стратэгічная гульня
GenericName[bg]=Стратегическа Игра
GenericName[bs]=Strateška igra
GenericName[ca]=Joc d'estratègia
GenericName[cs]=Strategická hra
GenericName[da]=Strategispil
GenericName[de]=Strategiespiel
GenericName[el]=Παιχνίδι Στρατηγικής
GenericName[eo]=Strategiludo
GenericName[es]=Juego de estrategia
GenericName[et]=Strateegiamäng
GenericName[fa]=بازی استراتژیک
GenericName[fi]=Strategiapeli
GenericName[fo]=Strategispæl
GenericName[fr]=Jeu de stratégie
GenericName[he]=משחק אסטרטגיה
GenericName[hr]=Igra strategije
GenericName[hu]=stratégiai
GenericName[is]=Herkænskuleikur
GenericName[it]=Gioco di strategia
GenericName[ja]=
GenericName[lo]=
GenericName[lt]=Strateginis žaidimas
GenericName[lv]=Stratēģiskā Game
GenericName[mk]=Стратегиска игра
GenericName[mn]=Стратегийн тоглоом
GenericName[mt]=Logħba ta' strateġija
GenericName[nb]=Strategispill
GenericName[nl]=strategisch spel
GenericName[nn]=Strategispel
GenericName[nso]=Papadi ya Mokgwa wa Tharollo
GenericName[pl]=Gra strategiczna
GenericName[pt]=Jogo de Estratégia
GenericName[pt_BR]=Estratégia
GenericName[ro]=Joc de strategie
GenericName[ru]=Стратегическая игра
GenericName[se]=Strategiijaspeallu
GenericName[sk]=Strategická hra
GenericName[sl]=Strateška igra
GenericName[ss]=Umdlalo wekusebentisa indlela yekwenta
GenericName[sv]=Strategispel
GenericName[th]=
GenericName[tr]=Strateji Oyunu
GenericName[uk]=Гра на стратегію
GenericName[ven]=Mutambo wa maitele awo
GenericName[xh]=Indlela ethile Yomdlalo
GenericName[zh_CN]=
GenericName[zh_TW]=
GenericName[zu]=Umdlalo weplani
Exec=freeciv-qt
Icon=freeciv
Path=
Terminal=false
Categories=Game;StrategyGame

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Mar 16 13:57:30 UTC 2015 - adrian@suse.de
- update to version 2.5.0
- switch to non-ancient UI libs (qt and gtk3)
=> two extra subpackages to have the choice
- fix moc-qt5 detection
-------------------------------------------------------------------
Sat Dec 6 17:35:10 UTC 2014 - andreas.stieger@gmx.de

View File

@ -1,7 +1,7 @@
#
# spec file for package freeciv
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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
@ -17,18 +17,21 @@
Name: freeciv
Version: 2.4.4
Version: 2.5.0
Release: 0
Summary: Free Civilization Clone
License: GPL-2.0+
Group: Amusements/Games/Strategy/Turn Based
Url: http://www.freeciv.org
Source0: http://download.gna.org/freeciv/stable/%{name}-%{version}.tar.bz2
Source1: freeciv.desktop
Source2: freeciv.png
Source3: freeciv-manual
Source4: freeciv-manual.desktop
Source5: freeciv-manual.png
Source1: freeciv-gtk3.desktop
Source2: freeciv-qt.desktop
Source3: freeciv.png
Source4: freeciv-manual
Source5: freeciv-manual.desktop
Source6: freeciv-manual.png
Patch1: fix-qt5-detection.patch
Requires: freeciv_client-%version
BuildRequires: SDL_mixer-devel
BuildRequires: audiofile-devel
BuildRequires: autoconf
@ -36,9 +39,11 @@ BuildRequires: automake
BuildRequires: curl-devel >= 7.9.7
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gtk2-devel
BuildRequires: gtk3-devel
BuildRequires: libbz2-devel
BuildRequires: libggz2-devel
BuildRequires: libqt5-qtbase-common-devel
BuildRequires: libqt5-qtbase-devel
BuildRequires: libtool
BuildRequires: readline-devel
BuildRequires: update-desktop-files
@ -55,15 +60,36 @@ exchange or (more often) the extinction of all other civilizations.
To start a new game, first start the server 'civserver,' then start the
client 'civclient'. Have fun!
%package qt
Summary: Qt client for freeciv
Group: Amusements/Games/Strategy/Turn Based
Provides: freeciv_client-%version
Requires: freeciv = %version
%description qt
Freeciv executable using Qt library
%package gtk3
Summary: Gtk3 client for freeciv
Group: Amusements/Games/Strategy/Turn Based
Provides: freeciv_client-%version
Requires: freeciv = %version
%description gtk3
Freeciv executable using Gtk3 library
%prep
%setup -q
%patch1
echo "X-SuSE-translate=false" >> bootstrap/freeciv-server.desktop.in
echo "X-SuSE-translate=false" >> bootstrap/freeciv-modpack.desktop.in
%build
export MOCCMD="moc-qt5"
autoreconf -fi
%configure \
--enable-client=gtk2 \
--enable-client=gtk3,qt \
--with-readline \
--disable-static \
--docdir=%{_docdir}/freeciv
@ -74,16 +100,19 @@ make DESTDIR=%{buildroot} install %{?_smp_mflags}
install -m 755 $RPM_SOURCE_DIR/freeciv-manual %{buildroot}%{_prefix}/bin
mkdir -p %{buildroot}%{_datadir}/pixmaps/
install -m 644 $RPM_SOURCE_DIR/*.png %{buildroot}%{_datadir}/pixmaps
%suse_update_desktop_file -i %{name} Game StrategyGame
rm %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file -i %{name}-gtk3 Game StrategyGame
%suse_update_desktop_file -i %{name}-qt Game StrategyGame
%suse_update_desktop_file -i freeciv-manual Game StrategyGame
%if 0%{?sles_version} == 11
rm -rf %{buildroot}/%{_datadir}/locale/no
%endif
%find_lang %{name}
%find_lang %{name}-nations
%fdupes %{buildroot}/%{_datadir}/
%files -f %{name}.lang
%files -f %{name}.lang -f %{name}-nations.lang
%defattr(-,root,root)
%doc %{_docdir}/freeciv
%exclude %{_docdir}/freeciv/INSTALL*
@ -92,14 +121,12 @@ rm -rf %{buildroot}/%{_datadir}/locale/no
%{_mandir}/man6/freeciv-*.6.gz
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/database.lua
%{_bindir}/freeciv-gtk2
%{_bindir}/freeciv-server
%{_bindir}/freeciv-manual
%{_bindir}/freeciv-modpack
#%{_bindir}/freeciv-modpack
%{_datadir}/applications/freeciv-manual.desktop
#%{_datadir}/applications/freeciv-modpack.desktop
%{_datadir}/applications/freeciv-server.desktop
%{_datadir}/applications/freeciv-modpack.desktop
%{_datadir}/applications/%{name}.desktop
%{_datadir}/freeciv/
%{_datadir}/icons/hicolor/128x128/apps/freeciv-client.png
%{_datadir}/icons/hicolor/128x128/apps/freeciv-server.png
@ -122,4 +149,16 @@ rm -rf %{buildroot}/%{_datadir}/locale/no
%dir %{_datadir}/appdata
%{_datadir}/appdata/%{name}-*.appdata.xml
%files gtk3
%defattr(-,root,root)
%{_bindir}/freeciv-gtk3
%{_bindir}/freeciv-mp-gtk3
%{_datadir}/applications/%{name}-gtk3.desktop
/usr/share/applications/freeciv-mp-gtk3.desktop
%files qt
%defattr(-,root,root)
%{_bindir}/freeciv-qt
%{_datadir}/applications/%{name}-qt.desktop
%changelog