0d8918b
# include fallback defs for _ggz_config, _ggz_datadir macros
0d8918b
# feel free to drop when ggz-client-lib including these is deployed everywhere
0d8918b
%{!?_ggz_config:%define _ggz_config %{_bindir}/ggz-config}
0d8918b
%{!?_ggz_datadir:%define _ggz_datadir %(%{_ggz_config} --datadir >& /dev/null ||:)}
0d8918b
eb2e95f
Name:           freeciv
bb26893
Version:        2.2.0
0f217d9
Release:        1%{?dist}
b1dec67
Summary:        A multi-player strategy game
eb2e95f
eb2e95f
Group:          Amusements/Games
f261886
License:        GPLv2+
84c38bb
URL:            http://freeciv.wikia.com/index.php/Freeciv
84c38bb
Source0:        http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
eb2e95f
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
eb2e95f
bb26893
##Fix DSO patch
bb26893
Patch10:	freeciv-client-fix-DSO.patch
bb26893
7620a42
BuildRequires:	gtk2-devel
eb2e95f
BuildRequires:	readline-devel
eb2e95f
BuildRequires:	zlib-devel
eb2e95f
BuildRequires:	SDL_mixer-devel
eb2e95f
BuildRequires:	esound-devel
eb2e95f
BuildRequires:	ncurses-devel
d17b482
BuildRequires:	ggz-gtk-client-devel
48e2868
BuildRequires:	desktop-file-utils
eb2e95f
BuildRequires:	gettext
c75b3e5
2c6c31e
Requires(post): ggz-client-libs
2c6c31e
Requires(preun): ggz-client-libs
57e2f52
d6e4d6d
c75b3e5
%description
c75b3e5
Freeciv is a turn-based, multi-player, X based strategy game. Freeciv
c75b3e5
is generally comparable to, and has compatible rules with, the
c75b3e5
Civilization II(R) game by Microprose(R). In Freeciv, each player is
c75b3e5
the leader of a civilization, and is competing with the other players
c75b3e5
in order to become the leader of the greatest civilization.
c75b3e5
d6e4d6d
c75b3e5
%prep
eb2e95f
%setup -q -n %{name}-%{version}
bb26893
%patch10 -p0
c75b3e5
c75b3e5
%build
bb26893
%configure --enable-client=gtk --disable-static
eb2e95f
make %{?_smp_mflags}
c75b3e5
c75b3e5
%install
c75b3e5
rm -rf $RPM_BUILD_ROOT
d6e4d6d
make install DESTDIR=$RPM_BUILD_ROOT
d6e4d6d
%find_lang %{name}
eb2e95f
eb2e95f
desktop-file-install --vendor fedora --delete-original	\
eb2e95f
	--dir $RPM_BUILD_ROOT%{_datadir}/applications	\
eb2e95f
	$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
eb2e95f
84c38bb
desktop-file-install --vendor fedora --delete-original \
eb2e95f
	--dir $RPM_BUILD_ROOT%{_datadir}/applications  	\
84c38bb
	$RPM_BUILD_ROOT%{_datadir}/applications/%{name}-server.desktop
eb2e95f
eb2e95f
# Remove civmanual
eb2e95f
rm $RPM_BUILD_ROOT%{_bindir}/civmanual
57e2f52
# ggz config
57e2f52
# omit ggz.modules, to register at install, not build, time.
57e2f52
rm $RPM_BUILD_ROOT%{_sysconfdir}/ggz.modules
57e2f52
# include .dsc files
57e2f52
install -p -D -m644 data/civclient.dsc $RPM_BUILD_ROOT%{_ggz_datadir}/civclient.dsc
bb26893
find $RPM_BUILD_ROOT -name '*.la' -delete
bb26893
find $RPM_BUILD_ROOT -name '*.a' -delete
c75b3e5
c75b3e5
%clean
eb2e95f
rm -rf $RPM_BUILD_ROOT
c75b3e5
84c38bb
%post
57e2f52
%{_ggz_config} --install --force --modfile=%{_ggz_datadir}/civclient.dsc || :
84c38bb
touch --no-create %{_datadir}/icons/hicolor
84c38bb
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
84c38bb
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
84c38bb
fi
84c38bb
57e2f52
%preun
57e2f52
if [ $1 -eq 0 ]; then
57e2f52
%{_ggz_config} --remove --modfile=%{_ggz_datadir}/civclient.dsc || :
57e2f52
fi
84c38bb
84c38bb
%postun
84c38bb
touch --no-create %{_datadir}/icons/hicolor
84c38bb
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
84c38bb
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
84c38bb
fi
84c38bb
84c38bb
c75b3e5
%files -f %{name}.lang
c75b3e5
%defattr(-,root,root)
84c38bb
%doc COPYING NEWS doc/BUGS doc/HOWTOPLAY doc/README
eb2e95f
%doc doc/README.AI doc/README.agents doc/README.attributes doc/README.cma
eb2e95f
%doc doc/README.delta doc/README.effects doc/README.ftwl doc/HACKING
eb2e95f
%doc doc/README.scorelog doc/TODO
eb2e95f
%doc doc/README.graphics doc/README.sound
bb26893
%{_bindir}/freeciv-server
bb26893
%{_bindir}/freeciv-gtk2
c63a464
%{_datadir}/%{name}/
788dc93
%{_datadir}/applications/fedora-*.desktop
da30873
%{_datadir}/icons/hicolor/*/apps/*.png
84c38bb
%{_datadir}/pixmaps/%{name}-client.png
bb26893
%{_mandir}/man6/freeciv*6*
57e2f52
%{_ggz_datadir}/civclient.dsc
c75b3e5
d6e4d6d
c75b3e5
%changelog
bb26893
* Tue Mar 02 2010 Thomas Janssen <thomasj@fedoraproject.org> 2.2.0
bb26893
- New upstream source 2.2.0
bb26893
a6dcf9a
* Fri Jan 29 2010 Brian Pepple <bpepple@fedoraproject.org> - 2.1.11-1
a6dcf9a
- Update to 2.1.11.
a6dcf9a
0f217d9
* Fri Dec 11 2009 Brian Pepple <bpepple@fedoraproject.org> - 2.1.10-1
0f217d9
- Update to 2.1.10.
0f217d9
77c50ac
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.9-2
77c50ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
77c50ac
6704225
* Sun Apr  5 2009 Brian Pepple <bpepple@fedoraproject.org> - 2.1.9-1
6704225
- Update to 2.1.9.
6704225
Adam Tkac 975a8a8
* Mon Mar 09 2009 Adam Tkac <atkac redhat com> - 2.1.8-3
Adam Tkac 975a8a8
- drop bind-devel BuildReq, it is not needed
Adam Tkac 975a8a8
bd5114a
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.8-2
bd5114a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
bd5114a
c017e0e
* Thu Dec  4 2008 Brian Pepple <bpepple@fedoraproject.org> - 2.1.8-1
c017e0e
- Update to 2.1.8.
c017e0e
e5cc81f
* Wed Nov 26 2008 Brian Pepple <bpepple@fedoraproject.org> - 2.1.7-1
e5cc81f
- Update to 2.1.7.
e5cc81f
b1dec67
* Sat Nov 22 2008 Brian Pepple <bpepple@fedoraproject.org> - 2.1.6-2
b1dec67
- Simplify summary.
b1dec67
0d8b308
* Sat Aug 23 2008 Brian Pepple <bpepple@fedoraproject.org> - 2.1.6-1
0d8b308
- Update to 2.1.6.
0d8b308
da30873
* Thu Jun 19 2008 Brian Pepple <bpepple@fedoraproject.org> - 2.1.5-1
da30873
- Update to 2.1.5.
da30873
f216754
* Tue Apr 29 2008 Brian Pepple <bpepple@fedoraproject.org> - 2.1.4-1
f216754
- Update to 2.1.4.
f216754
2c6c31e
* Sat Feb  9 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> 2.1.3-4
2c6c31e
- Fix up typo.
2c6c31e
57e2f52
* Fri Feb  8 2008 Rex Dieter <rdieter@fedoraproject.org> 2.1.3-3
57e2f52
- fixup ggz integration (#431726)
57e2f52
d17b482
* Mon Feb  4 2008 Brian Pepple <bpepple@fedoraproject.org> - 2.1.3-2
d17b482
- Add ggz gaming support.
d17b482
7620a42
* Sat Jan 26 2008 Brian Pepple <bpepple@fedoraproject.org> - 2.1.3-1
7620a42
- Update to 2.1.3.
7620a42
6f5f78a
* Tue Dec 25 2007 Brian Pepple <bpepple@fedoraproject.org> - 2.1.2-1
6f5f78a
- Update to 2.1.2.
6f5f78a
7b3a518
* Thu Nov 29 2007 Brian Pepple <bpepple@fedoraproject.org> - 2.1.1-1
7b3a518
- Update to 2.1.1.
7b3a518
- Drop buffer overflow patch. fixed upstream.
7b3a518
- Drop open file patch. fixed upstream.
7b3a518
e6c695b
* Sat Nov 24 2007 Brian Pepple <bpepple@fedoraproject.org> - 2.1.0-2
e6c695b
- Add patch to fix buffer overflow. (#397531)
e6c695b
84c38bb
* Sun Oct 28 2007 Brian Pepple <bpepple@fedoraproject.org> - 2.1.0-1
84c38bb
- Update to 2.1.0.
84c38bb
- Update urls.
84c38bb
- Update aifill & open patches.
84c38bb
- Remove old freeciv pixmap.
84c38bb
- Remove desktop patch.
84c38bb
25e125d
* Sun Sep 16 2007 Brian Pepple <bpepple@fedoraproject.org> - 2.0.9-4
25e125d
- Add patch to fix open function build bug.
25e125d
98abc57
* Tue Aug 21 2007 Brian Pepple <bpepple@fedoraproject.org> - 2.0.9-3
98abc57
- Rebuild.
98abc57
f261886
* Thu Aug  2 2007 Brian Pepple <bpepple@fedoraproject.org> - 2.0.9-2
f261886
- Update license tag.
f261886
970ba00
* Tue Feb 13 2007 Brian Pepple <bpepple@fedoraproject.org> - 2.0.9-1
970ba00
- Update to 2.0.9.
970ba00
- Drop button patch, fixed upstream.
970ba00
- Drop security patch, fixed upstream.
970ba00
- Drop X-Fedora category from desktop files.
970ba00
d6e4d6d
* Thu Sep  7 2006 Brian Pepple <bpepple@fedoraproject.org> - 2.0.8-7
d6e4d6d
- Rebuild for FC6.
d6e4d6d
083f4e8
* Wed Aug  2 2006 Brian Pepple <bpepple@fedoraproject.org> - 2.0.8-6
083f4e8
- Update security patch.
083f4e8
- Add patch to fix turn done buttons style.
083f4e8
e850834
* Tue Aug  1 2006 Brian Pepple <bpepple@fedoraproject.org> - 2.0.8-5
e850834
- Add patch to fix CVE-2006-3913 vulnerability. (#200545)
e850834
- Replace desktop file category 'Strategy' with 'StrategyGame'. (#198086)
e850834
c63a464
* Mon Mar  6 2006 Brian Pepple <bdpepple@ameritech.net> - 2.0.8-2
c63a464
- Update to 2.0.8.
c63a464
dd02c80
* Thu Feb 16 2006 Brian Pepple <bdpepple@ameritech.net> - 2.0.7-6
dd02c80
- Remove unnecessary BR (alsa-lib-devel & SDL-devel).
dd02c80
d004fc6
* Mon Feb 13 2006 Brian Pepple <bdpepple@ameritech.net> - 2.0.7-5
d004fc6
- rebuilt for new gcc4.1 snapshot and glibc changes
d004fc6
51c7023
* Sun Dec  4 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.7-4
51c7023
- Rebuild for new bind.
51c7023
788dc93
* Sun Nov  6 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.7-3
788dc93
- Update to 2.0.7.
788dc93
- Modify desktop patch for upstream fixes.
788dc93
- Drop the %%config from .desktop files.
788dc93
ea5dfea
* Mon Sep 26 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.6-3
ea5dfea
- Update to 2.0.6.
ea5dfea
a64f7a7
* Fri Sep  2 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.5-3
a64f7a7
- Update to 2.0.5.
a64f7a7
- Enable debug info.
a64f7a7
fe53e07
* Tue Aug 16 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.4-4
1ded6eb
- Rebuild for cairo dep.
1ded6eb
0dc7f32
* Thu Jul 28 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.4-2
0dc7f32
- Update to 2.0.4.
0dc7f32
- Use new stdsounds.
0dc7f32
8be9f0f
* Fri Jul 15 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.3-2
8be9f0f
- Bump release.
8be9f0f
8be9f0f
* Thu Jul 14 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.3-1
0336c71
- Update to 2.0.3.
0336c71
97290e3
* Tue Jun 14 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.2-1
97290e3
- Update to 2.0.2.
97290e3
- Add dist tag.
97290e3
26b56cb
* Tue Apr 26 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.1-1.fc4
26b56cb
- Update to 2.0.1.
26b56cb
f5ad415
* Mon Apr 18 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.0-3.fc4
f5ad415
- Re-add patch to set aifill to 5 on new servers to get some opponents.
f5ad415
c2557d0
* Mon Apr 18 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.0-2.fc4
c2557d0
- remove redundant --dir* options in %%configure & %%makeinstall.
c2557d0
f5ad415
* Mon Apr 18 2005 Brian Pepple <bdpepple@ameritech.net> - 2.0.0-1.fc4
eb2e95f
- Update to 2.0.0.
eb2e95f
- Drop 1.14 patches.
eb2e95f
- Add new BR's for 2.0.0.
eb2e95f
c411c97
* Sat Mar 26 2005 Brian Pepple <bdpepple@ameritech.net> - 1.14.2-7
c411c97
- Fixed typos.
c411c97
48e2868
* Sat Mar 26 2005 Brian Pepple <bdpepple@ameritech.net> - 1.14.2-6
48e2868
- Added more macros.
48e2868
- Replaced BuildPrereq with BuildRequires.
48e2868
- Drop version of gtk2-devel, since FC3 & later meet minimum needed.
48e2868
71bc695
* Wed Mar 23 2005 Brian Pepple <bdpepple@ameritech.net> - 1.14.2-5
71bc695
- Changed X-Red-Hat-Extra to X-Fedora.
71bc695
- Added URL.
71bc695
- Changed BuildRoot to preferred value.
71bc695
- Removed period from summary.
71bc695
c75b3e5
* Wed Jan 12 2005 Tim Waugh <twaugh@redhat.com> 1.14.2-4
c75b3e5
- Rebuilt for new readline.
c75b3e5
c75b3e5
* Tue Oct 26 2004 Daniel Reed <djr@redhat.com> 1.14.2-3
c75b3e5
- [136921] Try a little harder to run as nobody
c75b3e5
c75b3e5
* Mon Oct 25 2004 Daniel Reed <djr@redhat.com> 1.14.2-2
c75b3e5
- [136921] Provide the user with the opportunity to run FreeCiv as root if unable to su to nobody, and throw up an error message if everything fails
c75b3e5
c75b3e5
* Mon Sep 13 2004 Karsten Hopp <karsten@redhat.de> 1.14.2-1 
c75b3e5
- update to latest stable version
c75b3e5
c75b3e5
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
c75b3e5
- rebuilt
c75b3e5
c75b3e5
* Mon Feb 23 2004 Karsten Hopp <karsten@redhat.de> 1.14.1-3
c75b3e5
- rebuild with new chown syntax
c75b3e5
c75b3e5
* Mon Feb 23 2004 Tim Waugh <twaugh@redhat.com>
c75b3e5
- Use ':' instead of '.' as separator for chown.
c75b3e5
c75b3e5
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
c75b3e5
- rebuilt
c75b3e5
c75b3e5
* Wed Dec 03 2003 Karsten Hopp <karsten@redhat.de> 1.14.1-1
c75b3e5
- update to bugfix release 1.14.1
c75b3e5
c75b3e5
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
c75b3e5
- rebuilt
c75b3e5
c75b3e5
* Thu May 08 2003 Karsten Hopp <karsten@redhat.de> 1.14.0-1
c75b3e5
- update
c75b3e5
c75b3e5
* Thu Feb 20 2003 Karsten Hopp <karsten@redhat.de> 1.13.0-6
c75b3e5
- remove last patch (obsolete)
c75b3e5
c75b3e5
* Wed Feb 19 2003 Karsten Hopp <karsten@redhat.de>
c75b3e5
- fix message translation (#84599)
c75b3e5
c75b3e5
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
c75b3e5
- rebuilt
c75b3e5
c75b3e5
* Thu Nov 07 2002 Karsten Hopp <karsten@redhat.de>
c75b3e5
- spelling fix (#75021)
c75b3e5
- set aifill to 5 on new servers to get some opponents (#72586)
c75b3e5
c75b3e5
* Thu Aug 01 2002 Karsten Hopp <karsten@redhat.de>
c75b3e5
- desktop fixes (#69391)
c75b3e5
c75b3e5
* Wed Jul 24 2002 Karsten Hopp <karsten@redhat.de>
c75b3e5
- 0.1.13
c75b3e5
- s/Games/Game in desktop-file-install
c75b3e5
- fix URL
c75b3e5
- add standard sounds 
c75b3e5
c75b3e5
* Wed Jul 17 2002 Karsten Hopp <karsten@redhat.de> 1.12.0-6
c75b3e5
- fix path to datafiles if FREECIV_PATH is not set (#67922)
c75b3e5
- fix desktop files (#67920)
c75b3e5
- use desktop-file-install
c75b3e5
c75b3e5
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
c75b3e5
- automated rebuild
c75b3e5
c75b3e5
* Thu May 23 2002 Tim Powers <timp@redhat.com>
c75b3e5
- automated rebuild
c75b3e5
c75b3e5
* Thu Jan 24 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.12.0-2
c75b3e5
- Rebuild in current environment
c75b3e5
c75b3e5
* Thu Aug 23 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.12.0-1
c75b3e5
- 1.12.0 (non-beta)
c75b3e5
c75b3e5
* Tue Jul 31 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.11.4-9
c75b3e5
- Rebuild - the fix for #49442 didn't seem to get in last time.
c75b3e5
c75b3e5
* Mon Jul 30 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.11.4-8
c75b3e5
- Fix up demographics (#50119)
c75b3e5
c75b3e5
* Wed Jun 27 2001 Than Ngo <than@redhat.com>
c75b3e5
- support new gettext
c75b3e5
- add patch to build against new libtool
c75b3e5
c75b3e5
* Tue Mar 20 2001 Florian La Roche <Florian.LaRoche@redhat.de>
c75b3e5
- use gtk-config instead of glib-config
c75b3e5
c75b3e5
* Sun Feb 25 2001 Bernhard Rosenkraenzer <bero@redhat.com>
c75b3e5
- Fix up civclient-wrapper so it doesn't fail silently when started as
c75b3e5
  potentially harmful user (Bug #28928)
c75b3e5
c75b3e5
* Tue Aug  1 2000 Bernhard Rosenkraenzer <bero@redhat.com>
c75b3e5
- Fix warning in civclient-wrapper (Bug 14860)
c75b3e5
eb2e95f
* Fri Jul 21 2000 Trond Eivind Glomsrød <teg@redhat.com>
c75b3e5
- 1.11.4
c75b3e5
- move to /usr/bin and /usr/share/freeciv (no more /usr/games)
c75b3e5
eb2e95f
* Wed Jul 12 2000 Trond Eivind Glomsrød <teg@redhat.com>
c75b3e5
- remove icon, glint is obsoleted
c75b3e5
- don't use find to build file lists, it claimed to own
c75b3e5
  lots of directories
c75b3e5
- use %%{_tmppath}
c75b3e5
c75b3e5
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
c75b3e5
- automatic rebuild
c75b3e5
c75b3e5
* Mon Jul 10 2000 Bernhard Rosenkraenzer <bero@redhat.com>
c75b3e5
- 1.11.0 (Bug #13610)
c75b3e5
- Add .desktop files (Bug #13610)
c75b3e5
- Add BuildPrereq: lines
c75b3e5
- fix build
c75b3e5
c75b3e5
* Thu Jun  8 2000 Bernhard Rosenkraenzer <bero@redhat.com>
c75b3e5
- move to dist
c75b3e5
- update
c75b3e5
- clean up the spec file
c75b3e5
- fix build with gcc 2.96
c75b3e5
- make the gtk client default; it's better than the Xaw one by now.
c75b3e5
c75b3e5
* Thu Feb 24 2000 Bernhard Rosenkraenzer <bero@redhat.com>
c75b3e5
- 1.10.0
c75b3e5
c75b3e5
* Fri Feb  4 2000 Bernhard Rosenkraenzer <bero@redhat.com>
c75b3e5
- 1.9.2
c75b3e5
- use the configure macro
c75b3e5
c75b3e5
* Sun Nov  7 1999 Bernhard Rosenkraenzer <bero@redhat.com>
c75b3e5
- redo RPM for 1.9.0 (many changes to build/install procedure)