cvsextras b7899e1
Name:           wesnoth
d9d88c9
Version:        1.0
5f5a56a
Release:        1%{?dist}
09026aa
Summary:        Turn-based strategy game with a fantasy theme
cvsextras b7899e1
8aaef5e
Group:          Amusements/Games
cvsextras b7899e1
License:        GPL
cvsextras b7899e1
URL:            http://www.wesnoth.org
5f5a56a
Source0:        http://www.wesnoth.org/files/wesnoth-1.0.tar.gz
8aaef5e
Source1:        wesnothd.init
8aaef5e
Source2:        wesnoth.sysconfig
5f5a56a
#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
8aaef5e
BuildRequires:  SDL_ttf-devel, SDL_net-devel, freetype-devel
8aaef5e
BuildRequires:  libpng-devel
8aaef5e
BuildRequires:  desktop-file-utils, gettext
8aaef5e
cvsextras b7899e1
cvsextras b7899e1
%description
09026aa
The Battle for Wesnoth is a turn-based strategy game with a fantasy theme.
cvsextras b7899e1
09026aa
Build up a great army, gradually turning raw recruits into hardened
09026aa
veterans. In later games, recall your toughest warriors and form a deadly
09026aa
host against whom none can stand. Choose units from a large pool of
09026aa
specialists, and hand-pick a force with the right strengths to fight well
09026aa
on different terrains against all manner of opposition.
09026aa
09026aa
Fight to regain the throne of Wesnoth, of which you are the legitimate
09026aa
heir, or use your dread power over the Undead to dominate the land of
09026aa
mortals, or lead your glorious Orcish tribe to victory against the humans
09026aa
who dared despoil your lands. Wesnoth has many different sagas waiting to
09026aa
be played out. You can create your own custom units, and write your own
09026aa
scenarios--or even full-blown campaigns. You can also challenge your
09026aa
friends--or strangers--and fight multi-player epic fantasy battles.
cvsextras b7899e1
8aaef5e
8aaef5e
%package server
8aaef5e
Summary:	%{summary}
8aaef5e
Group:		Amusements/Games
9b82466
Requires:	%{name} = %{version}-%{release}
09026aa
Requires(post): /sbin/chkconfig
09026aa
Requires(preun): /sbin/chkconfig
09026aa
Requires(pre): /usr/sbin/useradd
8aaef5e
8aaef5e
%description server
8aaef5e
This package contains the binaries for running a Wesnoth server
8aaef5e
for multi-player games.
8aaef5e
8aaef5e
8aaef5e
%package tools
8aaef5e
Summary:	%{summary}
8aaef5e
Group:		Amusements/Games
9b82466
Requires:	%{name} = %{version}-%{release}
8aaef5e
8aaef5e
%description tools
8aaef5e
This package contains the game editor and development tools.
8aaef5e
8aaef5e
cvsextras b7899e1
%prep
5f5a56a
%setup -q
5f5a56a
#cp %{SOURCE3} .
d9d88c9
chmod -x MANUAL*
cvsextras b7899e1
cvsextras b7899e1
cvsextras b7899e1
%build
cvsextras b7899e1
%configure --disable-dependency-tracking \
8aaef5e
    --with-localedir=%{_datadir}/locale \
8aaef5e
    --enable-editor \
8aaef5e
    --enable-tools \
8aaef5e
    --enable-server \
8aaef5e
    --with-fifodir=/var/run/wesnothd \
8aaef5e
    --with-server-uid=$(id -u) \
8aaef5e
    --with-server-gid=$(id -g) 
8aaef5e
make %{?_smp_mflags}
cvsextras b7899e1
cvsextras b7899e1
cvsextras b7899e1
%install
cvsextras b7899e1
rm -rf $RPM_BUILD_ROOT
8aaef5e
make install DESTDIR=${RPM_BUILD_ROOT}
cvsextras b7899e1
cvsextras b7899e1
desktop-file-install --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
8aaef5e
                     --mode="0644" --vendor fedora \
8aaef5e
                     --add-category="X-Fedora" icons/%{name}.desktop
8aaef5e
# 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
8aaef5e
# arrange server package files
8aaef5e
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
8aaef5e
mv ${RPM_BUILD_ROOT}%{_bindir}/wesnothd ${RPM_BUILD_ROOT}%{_sbindir}
8aaef5e
mkdir -p ${RPM_BUILD_ROOT}/var/run/wesnothd
8aaef5e
touch ${RPM_BUILD_ROOT}/var/run/wesnothd/socket
8aaef5e
install -Dpm 755 %{SOURCE1} \
8aaef5e
    $RPM_BUILD_ROOT%{_initrddir}/wesnothd
8aaef5e
install -Dpm 644 %{SOURCE2} \
8aaef5e
    $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/wesnoth
8aaef5e
8aaef5e
%find_lang %{name}.\*
8aaef5e
#/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT %name --all-name
8aaef5e
cvsextras b7899e1
find $RPM_BUILD_ROOT -name ".cvs*" | xargs rm -f
cvsextras b7899e1
find $RPM_BUILD_ROOT -name "CVS" | xargs rm -rf
cvsextras b7899e1
8aaef5e
cvsextras b7899e1
%clean
cvsextras b7899e1
rm -rf $RPM_BUILD_ROOT
cvsextras b7899e1
8aaef5e
8aaef5e
%pre server
8aaef5e
/usr/sbin/useradd -c "Wesnoth server" -s /sbin/nologin \
8aaef5e
	-r -d /var/run/wesnothd wesnothd 2> /dev/null || :
8aaef5e
8aaef5e
8aaef5e
%post server
8aaef5e
/sbin/chkconfig --add wesnothd
8aaef5e
if [ $1 -gt 1 ]; then
8aaef5e
    %{_initrddir}/wesnothd try-restart >/dev/null || :
8aaef5e
fi
8aaef5e
8aaef5e
8aaef5e
%preun server
8aaef5e
if [ $1 -eq 0 ]; then
8aaef5e
    %{_initrddir}/wesnothd stop >/dev/null 2>&1 || :
8aaef5e
    /sbin/chkconfig --del wesnothd
8aaef5e
fi
8aaef5e
8aaef5e
8aaef5e
%files -f %{name}.\*.lang
cvsextras b7899e1
%defattr(-,root,root,-)
5f5a56a
%doc COPYING changelog README copyright MANUAL*
5f5a56a
#%doc README.fedora
8aaef5e
%{_bindir}/wesnoth
cvsextras b7899e1
%{_datadir}/%{name}
cvsextras b7899e1
%{_datadir}/applications/*
cvsextras b7899e1
%{_datadir}/pixmaps/*
8aaef5e
%{_mandir}/man6/wesnoth.6*
8aaef5e
%{_mandir}/*/man6/wesnoth.6*
8aaef5e
8aaef5e
%files tools
8aaef5e
%defattr(-,root,root,-)
8aaef5e
%{_bindir}/wesnoth_editor
8aaef5e
%{_bindir}/exploder
8aaef5e
%{_bindir}/cutter
8aaef5e
%{_bindir}/wmlxgettext
8aaef5e
%{_mandir}/man6/wesnoth_editor.6*
8aaef5e
%{_mandir}/*/man6/wesnoth_editor.6*
8aaef5e
8aaef5e
%files server
8aaef5e
%defattr(-,root,root,-)
8aaef5e
%config %{_initrddir}/wesnothd
8aaef5e
%config(noreplace) %{_sysconfdir}/sysconfig/wesnoth
8aaef5e
%{_sbindir}/wesnothd
8aaef5e
%{_mandir}/man6/wesnothd.*
8aaef5e
%{_mandir}/*/man6/wesnothd.*
8aaef5e
%attr(0700,wesnothd,wesnothd) %dir /var/run/wesnothd/
8aaef5e
%ghost /var/run/wesnothd/socket
cvsextras b7899e1
cvsextras b7899e1
%changelog
5f5a56a
* Tue Oct  4 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0-1
5f5a56a
- update to 1.0
5f5a56a
- remove README.fedora warning about game development status
5f5a56a
d9d88c9
* Wed Sep 21 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.0-0.1.rc1
d9d88c9
- update to 1.0rc1
d9d88c9
- remove exe bit from Turkish manual
d9d88c9
09026aa
* Wed Sep 14 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.7-1
09026aa
- update to 0.9.7
09026aa
09026aa
* Wed Aug 31 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.6-2
09026aa
- update summary and description
09026aa
- move and specify server package scriptlet requirements
09026aa
29098bc
* Sun Aug 28 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.6-1
29098bc
- update to 0.9.6
29098bc
9b82466
* Sat Aug 13 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.5-1
9b82466
- update to 0.9.5
9b82466
9df1653
* Wed Jul 27 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.4-1
9df1653
- update to 0.9.4
9df1653
8aaef5e
* Fri Jul  8 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.3-1
8aaef5e
- update to 0.9.3
8aaef5e
8aaef5e
* Mon Jun 13 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.9.2-1
8aaef5e
- update to 0.9.2
8aaef5e
- BR libpng-devel is needed
8aaef5e
- add initscript and scriptlets for -server package
8aaef5e
- don't build campaign server (upstream suggestion)
8aaef5e
- split off editor+tools into -tools sub-package
8aaef5e
- install translations into system's locale directories
8aaef5e
- merge Panu's changes:
8aaef5e
  Sat Apr 16 2005 Panu Matilainen <pmatilai@welho.com> 0.9.0-1
8aaef5e
- enable campaign server and tools
8aaef5e
- split server to separate package
8aaef5e
- add wesnothd user in server %%pre
8aaef5e
- buildrequire gettext
8aaef5e
8aaef5e
* Thu May 26 2005 Jeremy Katz <katzj@redhat.com> - 0.8-5
8aaef5e
- fix build on x86_64
8aaef5e
8aaef5e
* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 0.8-4
8aaef5e
- rebuild on all arches
8aaef5e
8aaef5e
* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
8aaef5e
- rebuilt
8aaef5e
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.