Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > by-pkgid > 54ab7ee115cc96eddd00c8b71cf9c290 > files > 5

netrek-vanilla-2.9pl7-4mdk.src.rpm

%define	base_name	vanilla
%define	Base_Name	Vanilla
%define	name		netrek-%{base_name}
%define	version		2.9pl7
%define release		4mdk
%define summary		Netrek Vanilla Server
%define summary_gum	Netrek Vanilla Server Configuration Program

Name:		%{name}
Version:	%{version}
Release:	%{release}
Summary:	%{summary}
License: 	BSD
Group: 		Games/Other
Source0:	%{Base_Name}-%{version}.tar.bz2
Source1:	%{Base_Name}.scripts.tar.bz2
Source2:	%{Base_Name}.icons.tar.bz2
Patch:		%{Base_Name}.source.patch.bz2
Url: 		http://%{base_name}.netrek.org
BuildRoot:	%{_tmppath}/%{name}-buildroot
Obsoletes:	%{base_name}
Provides:	%{base_name}
Buildrequires: libncurses-devel

%description
Netrek is the probably the first video game which can accurately be
described as a "sport."  It has more in common with basketball than
with arcade games or Quake.  Its vast and expanding array of tactics
and strategies allows for many different play styles; the best players
are the ones who think fastest, not necessarily the ones who twitch
most effectively.  It can be enjoyed as a twitch game, since the
dogfighting system is extremely robust, but the things that really set
Netrek apart from other video games are the team and strategic
aspects.  Team play is dynamic and varied, with roles constantly
changing as the game state changes.  Strategic play is explored in
organized league games; after 6+ years of league play, strategies are
still being invented and refined.

The game itself has existed for over 10 years, and has a solid
playerbase, including some people who have been playing for nearly as
long as the game has existed.

This is a server for the multi-player game of Netrek.

%package -n netrek-gum
Summary:	%{summary_gum}
Group:		Games/Other
BuildRequires:	libgtk+1.2-devel
Requires:	%{name}-%{version}

%description -n netrek-gum
Netrek is the probably the first video game which can accurately be
described as a "sport."  It has more in common with basketball than
with arcade games or Quake.  Its vast and expanding array of tactics
and strategies allows for many different play styles; the best players
are the ones who think fastest, not necessarily the ones who twitch
most effectively.  It can be enjoyed as a twitch game, since the
dogfighting system is extremely robust, but the things that really set
Netrek apart from other video games are the team and strategic
aspects.  Team play is dynamic and varied, with roles constantly
changing as the game state changes.  Strategic play is explored in
organized league games; after 6+ years of league play, strategies are
still being invented and refined.

The game itself has existed for over 10 years, and has a solid
playerbase, including some people who have been playing for nearly as
long as the game has existed.

This is a configuration program for the Netrek Vanilla Server.

Although the server will run out of the box, it can be configured to
behave differently through configuration files.  This program provides
a graphical interface to these files.  It is not required to play.

%prep
%setup -n %{Base_Name}-%{version}
%setup -n %{Base_Name}-%{version} -T -D -a1
%setup -n %{Base_Name}-%{version} -T -D -a2
%patch

%build
# server
./configure --prefix=%{_gamesbindir}/%{base_name}
make
# gui
(cd gum && %configure && %make)

%install
# server
make LIBDIR=$RPM_BUILD_ROOT/%{_gamesbindir}/%{base_name} install
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -d -m 755 $RPM_BUILD_ROOT/var/log/%{base_name}
install -m 755 bin/init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{base_name}
install -m 755 bin/crontab $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/%{base_name}
install -m 644 bin/logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{base_name}
install -m 644 bin/keys $RPM_BUILD_ROOT%{_gamesbindir}/%{base_name}/rsa-keyfile
# correct silly perm
chmod 644 $RPM_BUILD_ROOT/%{_gamesbindir}/%{base_name}/.planets
# gui
(cd gum && %makeinstall bindir=$RPM_BUILD_ROOT%{_gamesbindir} datadir=$RPM_BUILD_ROOT%{_gamesdatadir})
# icons
install -D -m 644 gum_48x48.png $RPM_BUILD_ROOT%{_liconsdir}/gum.png 
install -D -m 644 gum_32x32.png $RPM_BUILD_ROOT%{_iconsdir}/gum.png 
install -D -m 644 gum_16x16.png $RPM_BUILD_ROOT%{_miconsdir}/gum.png
# menu entry
mkdir -p $RPM_BUILD_ROOT%{_libdir}/menu
cat >$RPM_BUILD_ROOT%{_menudir}/netrek-gum <<EOF
?package(netrek-gum):\\
	command="%{_gamesbindir}/gum"\\
	needs="X11"\\
	icon="gum.png"\\
	section="Amusement/Other"\\
	title="Gum" \
	longtitle="%{summary_gum}"
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%post
# links
(cd %{_gamesbindir}/%{base_name} && ln -s /var/log/%{base_name} log)
# log files 
su games -c "touch /var/log/%{base_name}/god.LOG"
su games -c "touch /var/log/%{base_name}/mesg.LOG"
su games -c "touch /var/log/%{base_name}/newstartd.LOG"
su games -c "touch /var/log/%{base_name}/updated.LOG"
su games -c "touch /var/log/%{base_name}/errors.LOG"

# add vanilla service
chkconfig --add %{base_name}

%preun
# links
(cd %{_gamesbindir}/%{base_name} && rm -f log)

# stop vanilla if running
if [ -f /var/lock/subsys/%{base_name} ]; then
	%{_sysconfdir}/init.d/%{base_name} stop
fi
# remove vanilla service
chkconfig --del %{base_name}

%post -n netrek-gum
%{update_menus}

%postun -n netrek-gum
%{clean_menus}

%files
%defattr(-, root, root)
%doc BUGS ChangeLog CHANGES EXAMPLE INSTALL INSTALL.INL INSTALL.RSA
%doc MIRRORS README README.developers README.releasing
%doc xsg/XSG.doc xsg/Sample.xsgrc pledit/README
%{_sysconfdir}/rc.d/init.d/%{base_name}
%{_sysconfdir}/cron.hourly/%{base_name}
%{_sysconfdir}/logrotate.d/%{base_name}
%dir %{_gamesbindir}/%{base_name}
%config(noreplace) %{_gamesbindir}/%{base_name}/.banned
%config(noreplace) %{_gamesbindir}/%{base_name}/.bypass
%config(noreplace) %{_gamesbindir}/%{base_name}/.clue-bypass
%config(noreplace) %{_gamesbindir}/%{base_name}/.features
%config(noreplace) %{_gamesbindir}/%{base_name}/.motd
%config(noreplace) %{_gamesbindir}/%{base_name}/.motd_basep
%config(noreplace) %{_gamesbindir}/%{base_name}/.motd_clue
%config(noreplace) %{_gamesbindir}/%{base_name}/.nocount
%config(noreplace) %{_gamesbindir}/%{base_name}/.planets
%config(noreplace) %{_gamesbindir}/%{base_name}/.ports
%config(noreplace) %{_gamesbindir}/%{base_name}/.reserved
%config(noreplace) %{_gamesbindir}/%{base_name}/.sysdef
%config(noreplace) %{_gamesbindir}/%{base_name}/.time
%config(noreplace) %{_gamesbindir}/%{base_name}/.tourn.map
%config(noreplace) %{_gamesbindir}/%{base_name}/motd_basep_logo.MASTER
%config(noreplace) %{_gamesbindir}/%{base_name}/motd_clue_logo.MASTER
%config(noreplace) %{_gamesbindir}/%{base_name}/motd_logo.MASTER
%config(noreplace) %{_gamesbindir}/%{base_name}/rsa-keyfile
%{_gamesbindir}/%{base_name}/auto-archive.pl
%{_gamesbindir}/%{base_name}/basep
%{_gamesbindir}/%{base_name}/cambot
%{_gamesbindir}/%{base_name}/daemonII
%{_gamesbindir}/%{base_name}/end_tourney.pl
%{_gamesbindir}/%{base_name}/inl
%{_gamesbindir}/%{base_name}/mars
%{_gamesbindir}/%{base_name}/newbie
%{_gamesbindir}/%{base_name}/newstartd
%{_gamesbindir}/%{base_name}/ntserv
%{_gamesbindir}/%{base_name}/pledit
%{_gamesbindir}/%{base_name}/puck
%{_gamesbindir}/%{base_name}/robotII
%{_gamesbindir}/%{base_name}/rsa_key2cap
%{_gamesbindir}/%{base_name}/rsa_keycomp
%{_gamesbindir}/%{base_name}/sequencer
%{_gamesbindir}/%{base_name}/trekoff.bitmap
%{_gamesbindir}/%{base_name}/trekon
%{_gamesbindir}/%{base_name}/trekon.bitmap
%{_gamesbindir}/%{base_name}/updated
%{_gamesbindir}/%{base_name}/xsg
%{_gamesbindir}/%{base_name}/tools
%attr(-, games, games) %dir /var/log/%{base_name}

%files -n netrek-gum
%defattr(-, root, root)
%{_gamesbindir}/gum
%{_gamesdatadir}/gum
%{_menudir}/netrek-gum
%{_iconsdir}/gum.png
%{_miconsdir}/gum.png
%{_liconsdir}/gum.png

%changelog
* Fri Jun 14 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.9pl7-4mdk
- png icons (out xpm!)

* Sat Nov 03 2001 Guillaume Rousse <g.rousse@linux-mandrake.com> 2.9pl7-3mdk
- changed main package name to netrek-vanilla
- changed gum subpackage name to netrek-gum
- really fixed logrotate complaints
- fixed gum menu

* Sat Oct 27 2001 Guillaume Rousse <g.rousse@linux-mandrake.com> 2.9pl7-2mdk
- new in contribs
- fixed smp compilation
- fixed logrotate complaints
- rewrote init script
- changed license tag to BSD

* Wed Oct 24 2001 Guillaume Rousse <g.rousse@linux-mandrake.com> 2.9pl7-1mdk
- first mandrake release