%define version 2.5.0 %define name prboom %define release %mkrel 1 %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 Source2: %{name}-game-server.init 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} cp %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-game-server cp %{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 mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/ cat << EOF > %buildroot%{_datadir}/applications/mandriva-%{name}.desktop [Desktop Entry] Type=Application Categories=Game;ArcadeGame; Name=PrBooM Comment=%{Summary} Icon=doom2-newcaco Exec=%{_gamesbindir}/%{name} EOF cat << EOF > %buildroot%{_datadir}/applications/mandriva-%{name}-multiplayer.desktop [Desktop Entry] Type=Application Categories=Game;ArcadeGame; Name=PrBooM Multiplayer Comment=%{Summary} Icon=doom2-newcaco Exec=%{_gamesbindir}/%{name} -net \`hostname\`## EOF cat << EOF > %buildroot%{_datadir}/applications/mandriva-%{name}-homepage.desktop [Desktop Entry] Type=Application Categories=Documentation/Websites# Name=PrBooM Homepage# Icon=doom2-newcaco# Exec=if ps U \$USER | grep -q \$BROWSER; then \$BROWSER -remote \'openURL(%{url})\'; else \$BROWSER \'%{url}\'; fi EOF cat << EOF > %buildroot%{_datadir}/applications/mandriva-%{name}-gl.desktop [Desktop Entry] Type=Application Categories=Game;ArcadeGame; Name=PrBooM-GL Comment=%{Summary} Icon=doom2-newcaco Exec=%{_gamesbindir}/%{name}-gl EOF cat << EOF > %buildroot%{_datadir}/applications/mandriva-%{name}-gl-multiplayer.desktop [Desktop Entry] Type=Application Categories=More applications/Games/Arcade Name=PrBooM-GL Multiplayer Comment=%{Summary} Icon=doom2-newcaco Exec=%{_gamesbindir}/%{name}-gl -net \`hostname\` EOF %if %mdkversion < 200900 %post %{update_menus} %endif %if %mdkversion < 200900 %postun %{clean_menus} %endif %if %mdkversion < 200900 %post gl %{update_menus} %endif %if %mdkversion < 200900 %postun gl %{clean_menus} %endif %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* %{_datadir}/applications/mandriva-%{name}.desktop %{_datadir}/applications/mandriva-%{name}-multiplayer.desktop %{_datadir}/applications/mandriva-%{name}-homepage.desktop %{_iconsdir}/doom2-newcaco.png %{_miconsdir}/doom2-newcaco.png %{_liconsdir}/doom2-newcaco.png %files gl %defattr(-,root,root) %{_gamesbindir}/%{name}-gl %{_datadir}/applications/mandriva-%{name}-gl.desktop %{_datadir}/applications/mandriva-%{name}-gl-multiplayer.desktop %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 * Sat Dec 06 2008 Zombie Ryushu <ryushu@mandriva.org> 2.5.0-1mdv2009.1 + Revision: 311178 - Version bump to 2.5.0 - New Version * Fri Aug 01 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.4.7-5mdv2009.0 + Revision: 259284 - rebuild * Thu Jul 24 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.4.7-4mdv2009.0 + Revision: 247211 - rebuild + Pixel <pixel@mandriva.com> - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas * Tue Jan 08 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.4.7-2mdv2008.1 + Revision: 146654 - auto-convert XDG menu entry - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * 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 * Wed May 10 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 * Fri Oct 01 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.3.1-1mdk - 2.3.1 * Fri May 21 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