cvsextras b7899e1
Name:           wesnoth
3fd3cc1
Version:        1.2.8
9d1000e
Release:        1%{?dist}
91b9d21
Summary:        Turn-based strategy game with a fantasy theme
cvsextras b7899e1
c15e74b
Group:          Amusements/Games
3fd3cc1
License:        GPL+
cvsextras b7899e1
URL:            http://www.wesnoth.org
8b3e6b9
Source0:        http://www.%{name}.org/files/%{name}-%{version}.tar.bz2
0aa6c68
Source1:        wesnothd.init
3da6bd6
Source2:        %{name}.sysconfig
cvsextras b7899e1
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
cvsextras b7899e1
d0edd11
BuildRequires:	SDL_image-devel
d0edd11
BuildRequires:	SDL_mixer-devel
d0edd11
BuildRequires:  SDL_net-devel
d0edd11
BuildRequires:	freetype-devel
0aa6c68
BuildRequires:  libpng-devel
3da6bd6
BuildRequires:	fribidi-devel
3fd3cc1
BuildRequires:	python-devel
d0edd11
BuildRequires:  desktop-file-utils
d0edd11
BuildRequires:	gettext
0aa6c68
cvsextras b7899e1
cvsextras b7899e1
%description
91b9d21
The Battle for Wesnoth is a turn-based strategy game with a fantasy theme.
91b9d21
91b9d21
Build up a great army, gradually turning raw recruits into hardened
91b9d21
veterans. In later games, recall your toughest warriors and form a deadly
91b9d21
host against whom none can stand. Choose units from a large pool of
91b9d21
specialists, and hand-pick a force with the right strengths to fight well
91b9d21
on different terrains against all manner of opposition.
cvsextras b7899e1
91b9d21
Fight to regain the throne of Wesnoth, of which you are the legitimate
91b9d21
heir, or use your dread power over the Undead to dominate the land of
91b9d21
mortals, or lead your glorious Orcish tribe to victory against the humans
91b9d21
who dared despoil your lands. Wesnoth has many different sagas waiting to
91b9d21
be played out. You can create your own custom units, and write your own
91b9d21
scenarios--or even full-blown campaigns. You can also challenge your
91b9d21
friends--or strangers--and fight multi-player epic fantasy battles.
cvsextras b7899e1
0aa6c68
0aa6c68
%package server
0aa6c68
Summary:	%{summary}
0aa6c68
Group:		Amusements/Games
333d530
Requires:	%{name} = %{version}-%{release}
142ad59
Requires(post): /sbin/chkconfig
142ad59
Requires(preun): /sbin/chkconfig
142ad59
Requires(pre): /usr/sbin/useradd
0aa6c68
3da6bd6
0aa6c68
%description server
0aa6c68
This package contains the binaries for running a Wesnoth server
0aa6c68
for multi-player games.
0aa6c68
0aa6c68
0aa6c68
%package tools
0aa6c68
Summary:	%{summary}
0aa6c68
Group:		Amusements/Games
333d530
Requires:	%{name} = %{version}-%{release}
0aa6c68
3da6bd6
0aa6c68
%description tools
0aa6c68
This package contains the game editor and development tools.
0aa6c68
0aa6c68
cvsextras b7899e1
%prep
ad839bb
%setup -q
62eb38e
chmod -x MANUAL*
cvsextras b7899e1
cvsextras b7899e1
cvsextras b7899e1
%build
cvsextras b7899e1
%configure --disable-dependency-tracking \
0aa6c68
    --with-localedir=%{_datadir}/locale \
0aa6c68
    --enable-editor \
0aa6c68
    --enable-tools \
0aa6c68
    --enable-server \
3fd3cc1
    --enable-python \
0aa6c68
    --with-fifodir=/var/run/wesnothd \
0aa6c68
    --with-server-uid=$(id -u) \
0aa6c68
    --with-server-gid=$(id -g) 
c15e74b
make %{?_smp_mflags}
cvsextras b7899e1
cvsextras b7899e1
cvsextras b7899e1
%install
cvsextras b7899e1
rm -rf $RPM_BUILD_ROOT
0aa6c68
make install DESTDIR=${RPM_BUILD_ROOT}
cvsextras b7899e1
cvsextras b7899e1
desktop-file-install --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
c15e74b
                     --mode="0644" --vendor fedora \
3da6bd6
                     icons/%{name}.desktop
c15e74b
# add icon for menus
cvsextras b7899e1
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/pixmaps
cvsextras 5d43533
install -m 644 images/%{name}-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
cvsextras b7899e1
0aa6c68
# arrange server package files
0aa6c68
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
0aa6c68
mv ${RPM_BUILD_ROOT}%{_bindir}/wesnothd ${RPM_BUILD_ROOT}%{_sbindir}
0aa6c68
mkdir -p ${RPM_BUILD_ROOT}/var/run/wesnothd
0aa6c68
touch ${RPM_BUILD_ROOT}/var/run/wesnothd/socket
0aa6c68
install -Dpm 755 %{SOURCE1} \
0aa6c68
    $RPM_BUILD_ROOT%{_initrddir}/wesnothd
0aa6c68
install -Dpm 644 %{SOURCE2} \
0aa6c68
    $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/wesnoth
0aa6c68
4613863
%find_lang %{name}.\*
4613863
#/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT %name --all-name
0aa6c68
cvsextras b7899e1
find $RPM_BUILD_ROOT -name ".cvs*" | xargs rm -f
cvsextras b7899e1
find $RPM_BUILD_ROOT -name "CVS" | xargs rm -rf
cvsextras b7899e1
0aa6c68
cvsextras b7899e1
%clean
cvsextras b7899e1
rm -rf $RPM_BUILD_ROOT
cvsextras b7899e1
0aa6c68
0aa6c68
%pre server
0aa6c68
/usr/sbin/useradd -c "Wesnoth server" -s /sbin/nologin \
0aa6c68
	-r -d /var/run/wesnothd wesnothd 2> /dev/null || :
0aa6c68
0aa6c68
0aa6c68
%post server
0aa6c68
/sbin/chkconfig --add wesnothd
0aa6c68
if [ $1 -gt 1 ]; then
0aa6c68
    %{_initrddir}/wesnothd try-restart >/dev/null || :
0aa6c68
fi
0aa6c68
0aa6c68
0aa6c68
%preun server
0aa6c68
if [ $1 -eq 0 ]; then
0aa6c68
    %{_initrddir}/wesnothd stop >/dev/null 2>&1 || :
0aa6c68
    /sbin/chkconfig --del wesnothd
0aa6c68
fi
0aa6c68
0aa6c68
4613863
%files -f %{name}.\*.lang
cvsextras b7899e1
%defattr(-,root,root,-)
6eaea0c
%doc COPYING changelog README copyright MANUAL*
3da6bd6
%{_bindir}/%{name}
cvsextras b7899e1
%{_datadir}/%{name}
cvsextras b7899e1
%{_datadir}/applications/*
cvsextras b7899e1
%{_datadir}/pixmaps/*
0aa6c68
%{_mandir}/man6/wesnoth.6*
0aa6c68
%{_mandir}/*/man6/wesnoth.6*
0aa6c68
0aa6c68
%files tools
0aa6c68
%defattr(-,root,root,-)
0aa6c68
%{_bindir}/wesnoth_editor
0aa6c68
%{_bindir}/exploder
0aa6c68
%{_bindir}/cutter
0aa6c68
%{_mandir}/man6/wesnoth_editor.6*
0aa6c68
%{_mandir}/*/man6/wesnoth_editor.6*
0aa6c68
0aa6c68
%files server
0aa6c68
%defattr(-,root,root,-)
0aa6c68
%config %{_initrddir}/wesnothd
0aa6c68
%config(noreplace) %{_sysconfdir}/sysconfig/wesnoth
0aa6c68
%{_sbindir}/wesnothd
0aa6c68
%{_mandir}/man6/wesnothd.*
0aa6c68
%{_mandir}/*/man6/wesnothd.*
0aa6c68
%attr(0700,wesnothd,wesnothd) %dir /var/run/wesnothd/
0aa6c68
%ghost /var/run/wesnothd/socket
cvsextras b7899e1
cvsextras b7899e1
%changelog
3fd3cc1
* Sat Dec  1 2007 Brian Pepple <bpepple@fedoraproject.org> - 1.2.8-2
3fd3cc1
- Update to 1.2.8. Fixes #405661 (CVE-2007-5742)
3fd3cc1
- Enable python support.
3fd3cc1
- Update licence tag.
3fd3cc1
50036e6
* Sat Apr 21 2007 Warren Togami <wtogami@redhat.com> - 1.2.4-1
50036e6
- 1.2.4
50036e6
9d1000e
* Fri Mar 16 2007 Brian Pepple <bpepple@fedoraproject.org> - 1.2.3-1
9d1000e
- Update to 1.2.3.
9d1000e
8b3e6b9
* Sat Feb 24 2007 Brian Pepple <bpepple@fedoraproject.org> - 1.2.2-2
8b3e6b9
- Bump.
8b3e6b9
8b3e6b9
* Sat Feb 24 2007 Warren Togami <wtogami@redhat.com> - 1.2.2-1
8b3e6b9
- 1.2.2
8b3e6b9
8b3e6b9
* Mon Jan 15 2007 Brian Pepple <bpepple@fedoraproject.org> - 1.2.1-1
373de5a
- Update to 1.2.1.
373de5a
3da6bd6
* Sun Dec 24 2006 Brian Pepple <bpepple@fedoraproject.org> - 1.2-1
3da6bd6
- Update to 1.2.
8b3e6b9
8b3e6b9
* Sat Dec 23 2006 Brian Pepple <bpepple@fedoraproject.org> - 1.1.14-1
8b3e6b9
- Update to 1.1.14.
3da6bd6
- Add BR on fribidi-devel.
3da6bd6
- Drop X-Fedora category from desktop file.
3da6bd6
- Drop help speedup patch, fixed upstream.
3da6bd6
- Drop ttf patch, fixed upstream.
3da6bd6
d0edd11
* Thu Sep  7 2006 Brian Pepple <bpepple@fedoraproject.org> - 1.0.2-4
d0edd11
- Rebuild for FC6.
d0edd11
- Remove unnecessary BR on SDL-devel.
d0edd11
521506c
* Tue Jul 18 2006 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.2-3
ef170a4
- fix #199079, so loading some help pages like the "License" doesn't
ef170a4
  take ages
521506c
- remove BR SDL_ttf-devel, an included/patched copy is used since 0.8.7
521506c
- patch included SDL_ttf to build with freetype 2.x and not access
521506c
  an old freetype 1.x internal
521506c
9a608fb
* Wed Feb 15 2006 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.2-2
9a608fb
- rebuilt for FC5
9a608fb
60b6354
* Wed Dec 21 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.2-1
60b6354
- update to 1.0.2
60b6354
5355bda
* Sat Oct 22 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0.1-1
5355bda
- update to 1.0.1
5355bda
ad839bb
* Tue Oct  4 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0-1
ad839bb
- update to 1.0
6eaea0c
- remove README.fedora warning about game development status
ad839bb
cd8243b
* Wed Sep 21 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0-0.1.rc1
cd8243b
- update to 1.0rc1
62eb38e
- remove exe bit from Turkish manual
cd8243b
f2144da
* Wed Sep 14 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.7-1
f2144da
- update to 0.9.7
f2144da
142ad59
* Wed Aug 31 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.6-2
142ad59
- update summary and description
142ad59
- move and specify server package scriptlet requirements
142ad59
6b3538f
* Sun Aug 28 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.6-1
6b3538f
- update to 0.9.6
6b3538f
333d530
* Sat Aug 13 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.5-1
333d530
- update to 0.9.5
333d530
4525cbf
* Wed Jul 27 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.4-1
4525cbf
- update to 0.9.4
4525cbf
ebef6cc
* Fri Jul  8 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.3-1
ebef6cc
- update to 0.9.3
ebef6cc
0aa6c68
* Mon Jun 13 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.2-1
0aa6c68
- update to 0.9.2
0aa6c68
- BR libpng-devel is needed
0aa6c68
- add initscript and scriptlets for -server package
0aa6c68
- don't build campaign server (upstream suggestion)
7157d21
- split off editor+tools into -tools sub-package
0aa6c68
- install translations into system's locale directories
0aa6c68
- merge Panu's changes:
0aa6c68
  Sat Apr 16 2005 Panu Matilainen <pmatilai@welho.com> 0.9.0-1
0aa6c68
- enable campaign server and tools
0aa6c68
- split server to separate package
0aa6c68
- add wesnothd user in server %%pre
0aa6c68
- buildrequire gettext
0aa6c68
72cc8e1
* Thu May 26 2005 Jeremy Katz <katzj@redhat.com> - 0.8-5
72cc8e1
- fix build on x86_64
72cc8e1
71befc3
* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 0.8-4
71befc3
- rebuild on all arches
71befc3
8cb0c9b
* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
8cb0c9b
- rebuilt
8cb0c9b
cvsextras 5d43533
* Fri Jul 09 2004 Panu Matilainen <pmatilai@welho.com> 0:0.8-0.fdr.2
cvsextras 5d43533
- use upstream desktop file and icon
cvsextras 5d43533
cvsextras 5d43533
* Sat Jul 03 2004 Panu Matilainen <pmatilai@welho.com> 0:0.8-0.fdr.1
cvsextras 5d43533
- update to 0.8
cvsextras 5d43533
cvsextras b7899e1
* Tue Mar 30 2004 Panu Matilainen <pmatilai@welho.com> 0:0.7-0.fdr.1
cvsextras b7899e1
- update to 0.7
cvsextras b7899e1
cvsextras b7899e1
* Wed Dec 17 2003 Panu Matilainen <pmatilai@welho.com> 0:0.6.1-0.fdr.1
cvsextras b7899e1
- update to 0.6.1
cvsextras b7899e1
cvsextras b7899e1
* Mon Dec 15 2003 Panu Matilainen <pmatilai@welho.com> 0:0.6-0.fdr.2
cvsextras b7899e1
- update to bugfixed tarball of 0.6
cvsextras b7899e1
cvsextras b7899e1
* Fri Dec 12 2003 Panu Matilainen <pmatilai@welho.com> 0:0.6-0.fdr.1
cvsextras b7899e1
- update to 0.6
cvsextras b7899e1
- adapt to the new autoconf make system
cvsextras b7899e1
- enable editor and server
cvsextras b7899e1
cvsextras b7899e1
* Tue Nov 11 2003 Panu Matilainen <pmatilai@welho.com> 0:0.5.1-0.fdr.1
cvsextras b7899e1
- update to 0.5.1
cvsextras b7899e1
- Fedora -> fedora in desktop file vendor
cvsextras b7899e1
cvsextras b7899e1
* Tue Nov 04 2003 Panu Matilainen <pmatilai@welho.com> 0:0.5-0.fdr.1
cvsextras b7899e1
- Initial Fedora packaging.