-Summary: FREE CIVilization clone
-Summary(pl): Niekomercyjny klon CIVilization
-Name: freeciv
-Version: 1.7.1
-Release: 2
-Copyright: GPL
-Source0: ftp://freeciv.ultraviolet.org/pub/freeciv/%{name}-%{version}.tar.bz2
-Source1: freeciv-client.wmconfig
-Source2: freeciv-server.wmconfig
-Patch0: freeciv-cfg.patch
-Patch1: ftp://freeciv.ultraviolet.org/pub/freeciv/xaw3d.diff
-URL: http://www.freeciv.org/
-Icon: %{name}.gif
-Group: X11/Games/Strategy
-Buildroot: /tmp/%{name}-%{version}-root
+#
+# Conditional build:
+%bcond_without gtk2 # build gtk1 client, not gtk2
+
+Summary: FREE CIVilization clone
+Summary(es): Clon del juego Civilization
+Summary(pl): Niekomercyjny klon CIVilization
+Summary(pt_BR): Clone do jogo Civilization
+Name: freeciv
+Version: 1.14.1
+Release: 2
+License: GPL
+Group: X11/Applications/Games/Strategy
+Source0: ftp://ftp.freeciv.org/freeciv/stable/%{name}-%{version}.tar.bz2
+# Source0-md5: d328f65e7fca5252f27161f5f9e97a03
+Source1: %{name}-client.desktop
+Source2: %{name}-server.desktop
+Source3: %{name}.png
+Source4: ftp://ftp.freeciv.org/freeciv/contrib/sounds/sets/stdsounds1.tar.gz
+# Source4-md5: 28a54fbe3ddb67a9b8fe85b8332415e1
+Source5: ftp://ftp.freeciv.org/freeciv/contrib/sounds/sets/stdsounds.spec
+# Source5-md5: 6e3e2bc551eb49ca87c4f0085991db15
+URL: http://www.freeciv.org/
+BuildRequires: SDL_mixer-devel
+BuildRequires: esound-devel
+%{!?with_gtk2:BuildRequires: gtk+-devel > 1.2.1}
+%{?with_gtk2:BuildRequires: gtk+2-devel}
+%{!?with_gtk2:BuildRequires: imlib-devel >= 1.9.2}
+BuildRequires: readline-devel
+BuildRequires: zlib-devel
+Requires: SDL_mixer
+Requires: esound
+%{!?with_gtk2:Requires: gtk+ > 1.2.1}
+%{!?with_gtk2:Requires: imlib >= 1.9.2}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
%description
-Free clone of Sid Meiers Civilization. Free Civilization clone for unix and
-X. This is multiplayer strategic game and you can also play against
-computer-AI players.
+Free clone of Sid Meier's Civilization. Free Civilization clone for
+unix and X. This is multiplayer strategic game and you can also play
+against computer-AI players.
+
+%description -l es
+Clon del juego Civilization.
%description -l pl
-Freeciv jest to niekomercyjny (GPL) klon gry Civilization Sid'a Meiers'a.
-Jest to gra strategiczna pod X Window. Mo¿esz graæ w ni± z innymi osobami
-poprzez sieæ, a tak¿e przeciwko "graczom" zarz±dzanym przez komputer.
+Freeciv jest to niekomercyjny (GPL) klon gry Civilization Sida
+Meiera. Jest to gra strategiczna dla systemu X Window. Mo¿na graæ w
+ni± z innymi osobami poprzez sieæ, a tak¿e przeciwko "graczom"
+zarz±dzanym przez komputer.
+
+%description -l pt_BR
+O FreeCiv é uma implementação do Civilization II para o Sistema X
+Window.
%prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
+%setup -q -a 4
%build
-aclocal
-automake --gnu --include-deps Makefile
-autoconf
-CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" \
-./configure \
- --prefix=/usr/X11R6
-make
+%configure2_13 \
+%{!?with_gtk2: --enable-client=gtk} \
+%{?with_gtk2: --enable-client=gtk2}
+
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/{etc/X11/wmconfig,usr/X11R6/lib/X11/app-defaults}
+install -d $RPM_BUILD_ROOT%{_libdir}/X11/app-defaults \
+ $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
-make install prefix=$RPM_BUILD_ROOT/usr/X11R6
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
-strip $RPM_BUILD_ROOT/usr/X11R6/bin/*
+rm $RPM_BUILD_ROOT%{_datadir}/freeciv/Freeciv
-mv $RPM_BUILD_ROOT/usr/X11R6/share/freeciv/Freeciv \
-$RPM_BUILD_ROOT/usr/X11R6/lib/X11/app-defaults
+install %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
+install %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir}
+install %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/freeciv/stdsounds.soundspec
+cp -ar stdsounds $RPM_BUILD_ROOT%{_datadir}/freeciv
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/X11/wmconfig/freeciv-client
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/wmconfig/freeciv-server
+%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
-%files
-%defattr(644, root, root, 755)
-%doc AUTHORS ChangeLog README CREDITS freeciv_hackers_guide.txt
-%doc HOWTOPLAY
-%config(missingok) /etc/X11/wmconfig/*
-%attr(755, root, root) /usr/X11R6/bin/*
-%dir /usr/X11R6/share/freeciv
-/usr/X11R6/share/freeciv/*
-/usr/X11R6/lib/X11/app-defaults/Freeciv
-
-%changelog
-* Wed Dec 23 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [1.7.1-2]
-- added using LDFLAGS="-s" to ./configure enviroment,
-- added patch from freeciv contrib for using Xaw3d library instead Xaw.
-
-* Sat Aug 22 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [1.7.0-2]
-- removed CHANGES from %doc,
-- fixed some bugs in pl translation.
-
-* Thu Aug 6 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [1.7.0-1]
-- added -q %setup parameter,
-- added pl translation,
-- updated URL and %description (now ypu can play against AI players).
-
-* Sun Jun 7 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [1.6.2-1]
-- adde AUTHORS, ChangeLog, freeciv_hackers_guide.txt, HOWTOPLAY, ChangeLog
- to %doc,
-- added use %{SOURCE#} in %install,
-- fixed typo in wmconfig file for freeciv srv console,
-- wmconfig entries for freeciv, freeciv srv console moved to Games/Strategy,
-- added all modification for building freeciv with using GNU autoconf.
-
-* Mon May 11 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [1.5.4-2]
-- changed Source url,
-- now freeciv is builded from tar.bz2,
-- added temporary hack (Source2 field) rpm 2.4.109 bug wihch can't include
- Icon file in src.rpm.
-
-* Fri May 1 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [1.5.4-1]
-- added title in xterm with FC server console in wmconfig registration file,
-- %%{version} macro instead %%{PACKAGE_VERSION},
-- added using %%{name} macro in Buildroot,
-- added -q parametr for %setup.
-
-* Sun Apr 26 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [1.5.3-1]
-- added %clean section,
-- added using %defattr macro (require rpm >= 2.4.99),
-- updated URL,
-- added wmconfig registration file for freeciv client and server console,
-- all data moved to /usr/X11R6/share/freeciv,
-- removed Packager field from spec (if you want recompile package and
- redistribute this package later put this in your private .rpmrc).
-- changed %build procedure (using xmkmf),
-- added CDEBUGFLAGS="$RPM_OPT_FLAGS" make option.
-
-* Sun Sep 21 1997 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [1.0k-1]
-- changed %attr on %doc to (-, root,root)
-
-* Sat Aug 9 1997 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- [1.0j-1]
-- new version 1.0j,
-- all rewritetd for using Buildroot,
-- added:
- - URL,
- - %attr macros in %file (allows build package from non root account).
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%doc AUTHORS README ChangeLog NEWS
+%attr(755,root,root) %{_bindir}/*
+%{_datadir}/freeciv
+%{_desktopdir}/*
+%{_pixmapsdir}/*