cvsextras b7899e1
Name:           wesnoth
cd8243b
Version:        1.0
cd8243b
Release:        0.1.rc1%{?dist}
91b9d21
Summary:        Turn-based strategy game with a fantasy theme
cvsextras b7899e1
c15e74b
Group:          Amusements/Games
cvsextras b7899e1
License:        GPL
cvsextras b7899e1
URL:            http://www.wesnoth.org
cd8243b
Source0:        http://www.wesnoth.org/files/wesnoth-1.0rc1.tar.gz
0aa6c68
Source1:        wesnothd.init
0aa6c68
Source2:        wesnoth.sysconfig
0aa6c68
Source3:        README.fedora
cvsextras b7899e1
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
cvsextras b7899e1
cvsextras b7899e1
BuildRequires:  SDL-devel, SDL_image-devel, SDL_mixer-devel
c15e74b
BuildRequires:  SDL_ttf-devel, SDL_net-devel, freetype-devel
0aa6c68
BuildRequires:  libpng-devel
0aa6c68
BuildRequires:  desktop-file-utils, 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
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
0aa6c68
%description tools
0aa6c68
This package contains the game editor and development tools.
0aa6c68
0aa6c68
cvsextras b7899e1
%prep
cd8243b
%setup -q -n %{name}-1.0rc1
0aa6c68
cp %{SOURCE3} .
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 \
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 \
c15e74b
                     --add-category="X-Fedora" 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,-)
0aa6c68
%doc COPYING changelog README copyright MANUAL* README.fedora
0aa6c68
%{_bindir}/wesnoth
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
%{_bindir}/wmlxgettext
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
cd8243b
* Wed Sep 21 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0-0.1.rc1
cd8243b
- update to 1.0rc1
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.