Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > c57c1f1ba8ef5409d691a3860290ff64 > files > 7

prboom-2.4.7-2mdv2007.1.src.rpm

%define version 2.4.7
%define name    prboom
%define release %mkrel 2
%define	Summary	An enhanced version of DooM - classic 3D shoot-em-up game

Summary:	%{Summary}
Name:		%{name}
Version:	%{version}
Release:	%{release}
Source0:	http://prdownloads.sourceforge.net/prboom/%{name}-%{version}.tar.bz2
Source1:	%{name}-game-server.sysconfig.bz2
Source2:	%{name}-game-server.init.bz2
Source3:	doom2-newcaco16.png
Source4:	doom2-newcaco32.png
Source5:	doom2-newcaco48.png
URL:		http://prboom.sourceforge.net/
Group:		Games/Arcade
License:	GPL
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:	SDL-devel smpeg-devel SDL_mixer-devel SDL_net-devel
BuildRequires:	sed MesaGLU-devel
Requires:	TiMidity++
Requires:	doom-iwad

%description
Doom is the classic 3D shoot-em-up game. It must have been one of the best
selling games ever; it totally outclassed any 3D world games that preceded
it, with amazing speed, flexibility, and outstanding gameplay. The specs
to the game were released, and thousands of extra levels were written by
fans of the game; even today new levels are written for Doom faster then
any one person could play them.

-- NOTE : YOU NEED TO DOWNLOAD WAD FILES --
http://www.idsoftware.com/

%package gl
Summary:	OpenGL version
Group:		Games/Arcade
Requires:	%{name}

%description gl
This package contains the PrBooM binary that runs accelerated through
OpenGL.

%package server
Summary:	PrBooM game server
Group:		Games/Arcade
Requires(pre):	rpm-helper
Requires:	%{name}

%description server
This package contains the PrBooM server binary, that is the program 
that passes data between the different players in the game.

%prep
%setup -q

%build

%configure --disable-cpu-opt --enable-gl
%make
cp src/prboom prboom-gl

make clean

%configure --disable-cpu-opt
%make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall_std
install -m755 prboom-gl %{buildroot}%{_gamesbindir}

# delete unwanted files
rm -fr %{buildroot}%_datadir/doc/

#
# Initscript
install -d %{buildroot}%{_sysconfdir}/sysconfig \
	   %{buildroot}%{_initrddir}

bzcat %{SOURCE1} > %{buildroot}%{_sysconfdir}/sysconfig/%{name}-game-server
bzcat %{SOURCE2} > %{buildroot}%{_initrddir}/%{name}-game-server

sed -i "s|/etc/sysconfig|%{_sysconfdir}/sysconfig| ; s|/usr/games|%{_gamesbindir}|" \
%{buildroot}%{_initrddir}/%{name}-game-server


chmod 755 %{buildroot}%{_initrddir}/%{name}-game-server

#
# Icons
install -m644 %{SOURCE3} -D %{buildroot}%{_miconsdir}/doom2-newcaco.png
install -m644 %{SOURCE4} -D %{buildroot}%{_iconsdir}/doom2-newcaco.png
install -m644 %{SOURCE5} -D %{buildroot}%{_liconsdir}/doom2-newcaco.png

#
# Menus

install -d %{buildroot}%{_menudir}

cat << EOF > %{buildroot}%{_menudir}/%{name}
?package(%{name}): needs="x11" \
		   section="More Applications/Games/Arcade" \
		   title="PrBooM" \
		   longtitle="%{Summary}" \
		   icon="doom2-newcaco.png" \
		   command="%{_gamesbindir}/%{name}"
?package(%{name}): needs="x11" \
		   section="More Applications/Games/Arcade" \
		   title="PrBooM Multiplayer" \
		   longtitle="%{Summary}" \
		   icon="doom2-newcaco.png" \
		   command="%{_gamesbindir}/%{name} -net \`hostname\`"
#?package(%{name}): needs="x11" \
#		    section="Documentation/Websites" \
#		    title="PrBooM Homepage" \
#		    icon="doom2-newcaco.png" \
#		    command="if ps U \$USER | grep -q \$BROWSER; then \$BROWSER -remote \'openURL(%{url})\'; else \$BROWSER \'%{url}\'; fi"
EOF

cat << EOF > %{buildroot}%{_menudir}/%{name}-gl
?package(%{name}-gl): needs="x11" \
		      section="More Applications/Games/Arcade" \
		      title="PrBooM-GL" \
		      longtitle="%{Summary}" \
		      icon="doom2-newcaco.png" \
		      command="%{_gamesbindir}/%{name}-gl"
?package(%{name}-gl): needs="x11" \
		      section="More applications/Games/Arcade" \
		      title="PrBooM-GL Multiplayer" \
		      longtitle="%{Summary}" \
		      icon="doom2-newcaco.png" \
		      command="%{_gamesbindir}/%{name}-gl -net \`hostname\`"
EOF

%post
%{update_menus}

%postun
%{clean_menus}

%post gl
%{update_menus}

%postun gl
%{clean_menus}

%post server
%_post_service %{name}-game-server

%preun server
%_preun_service %{name}-game-server

%clean
rm -rf %{buildroot}

%files
%defattr (-,root,root)
%doc AUTHORS NEWS README TODO
%doc doc/*.txt doc/README.*
%{_gamesbindir}/%{name}
%dir %{_gamesdatadir}/doom
%{_gamesdatadir}/doom/%{name}.wad
%{_mandir}/man5/*
%{_mandir}/man6/%{name}.6*
%{_menudir}/%{name}
%{_iconsdir}/doom2-newcaco.png
%{_miconsdir}/doom2-newcaco.png
%{_liconsdir}/doom2-newcaco.png

%files gl
%defattr(-,root,root)
%{_gamesbindir}/%{name}-gl
%{_menudir}/%{name}-gl

%files server
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-game-server
%{_initrddir}/%{name}-game-server
%{_gamesbindir}/%{name}-game-server
%{_mandir}/man6/%{name}-game-server*


%changelog
* Tue Dec 12 2006 Olivier Blin <oblin@mandriva.com> 2.4.7-2mdv2007.0
+ Revision: 95954
- requires a doom IWAD (currently freedoom)

* Thu Dec 07 2006 Olivier Blin <oblin@mandriva.com> 2.4.7-1mdv2007.1
+ Revision: 92135
- use makeinstall_std to fix installation
- 2.4.7
- do not use old X11R6 folders
- Import prboom



* Tue May  9 2006 Olivier Blin <oblin@mandriva.com> 2.4.1-1mdk
- New release 2.4.1
- drop --without-x (it only prevents X libraries from being used)
- drop Patch0
- service isn't a config file
- use hostname from game host in menu, not build host

* Thu Sep 30 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.3.1-1mdk
- 2.3.1

* Thu May 20 2004 Michael Scherer <misc@mandrake.org> 2.3.0-1mdk
- New release 2.3.0
- adapt menus files
- use sed -i

* Sun Dec 14 2003 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 2.2.4-1mdk
- 2.2.4
- do not bzip2 icons in src.rpm
- rm -rf $RPM_BUILD_ROOT in %%install, not %%prep
- make a Summary macro to avoid conflicts
- fix buildrequires (lib64..)
- update %%docs
- fix menu-command-not-in-package
- fix no-longtitle-in-menu

* Sat Jul 12 2003 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.2.3-4mdk
- fix DIRM error

* Fri Nov 15 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.2.3-3mdk
- come in contrib

* Thu Nov 14 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.2.3-2plf
- Requires timidity

* Wed Nov 13 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.2.3-1plf 
- => plf
- Fix buildrequires
- by Maxim Heijndijk <cchq@wanadoo.nl>
	- 2.2.3.
	- Menus.
	- Fixed docs.
	- Server subpackage.
	- Server initscript.

* Thu Oct 25 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.2.2-1mdk
- 2.2.2

* Tue Oct 16 2001 Guillaume Cottenceau <gc@mandrakesoft.com> 2.2.1-2mdk
- fix no-documentation

* Fri Aug 31 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.2.1-1mdk
- 2.2.1

* Sun Jun 10 2001 Guillaume Cottenceau <gc@mandrakesoft.com> 2.2.0-1mdk
- version 2.2.0
- enable gl (through subpackage)

* Mon Jan 22 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.1.2-2mdk
- rebuild

* Thu Jan 04 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.1.2-1mdk
- updated to 2.1.2

* Mon Nov 13 2000 Lenny Cartier <lenny@mandrakesoft.com> 2.1.1-1mdk
- new in contribs