diff --git a/README.md b/README.md index a8fc9d5..973b8a5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # enemy-territory +RTCW-Enemy Territory is a free, stand-alone, downloadable multiplayer game in which players wage war as Axies or Allies in a team-based combat. + diff --git a/enemy-territory-etded-sysconfig b/enemy-territory-etded-sysconfig new file mode 100644 index 0000000..a9043b5 --- /dev/null +++ b/enemy-territory-etded-sysconfig @@ -0,0 +1,32 @@ +# Variable settings for RTCW-Enemy Territory dedicated server + +# executable +ETDED=/usr/share/games/enemy-territory/etded + +# video mode +VM_GAME=0 + +# server type: 1-dedicated server for lan; 2-dedicated server for internet +SERVER_TYPE=2 + +# net_port +NET_PORT=27960 + +# the amount of RAM the game will be allocated +COM_HUNKMEGS=64 +COM_ZONEMEGS=32 + +#The working directory is /var/games/enemy-territory/ +#With this variable you can define another path in which ETDED seek files +FS_BASEPATH=/usr/share/games/enemy-territory + +# MOD of player +#GAME_MOD=etpro + +# Punkbuster: 0-disabled; 1-enabled +SV_PUNKBUSTER=1 + +# the amount of RAM the game will be allocated +SERVER_CONFIG=server.cfg + + diff --git a/enemy-territory-initscript b/enemy-territory-initscript new file mode 100644 index 0000000..d24ac2e --- /dev/null +++ b/enemy-territory-initscript @@ -0,0 +1,69 @@ +#!/bin/sh +# +# et runs enemy-territory server +# +# chkconfig: 2345 85 15 +# description: Starts and stops the enemy-territory server +LOCKFILE=/var/lock/subsys/et + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Source et server configuration. +. /etc/sysconfig/etserver + + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +# See how we were called. +case "$1" in + start) + # Start daemon + [ "VM_GAME" ] && ETDED_OPTS="+set vm_game $VM_GAME" + [ "NET_PORT" ] && ETDED_OPTS="$ETDED_OPTS +set net_port $NET_PORT" + [ "COM_HUNKMEGS" ] && ETDED_OPTS="$ETDED_OPTS +set com_hunkmegs $COM_HUNKMEGS" + [ "COM_ZONEMEGS" ] && ETDED_OPTS="$ETDED_OPTS +set com_zonemegs $COM_ZONEMEGS" + [ "GAME_MOD" ] && ETDED_OPTS="$ETDED_OPTS +set fs_game $GAME_MOD" + [ "SERVER_TYPE" ] && ETDED_OPTS="$ETDED_OPTS +set dedicated $SERVER_TYPE" + [ "FS_BASEPATH" ] && ETDED_OPTS="$ETDED_OPTS +set fs_basepath $FS_BASEPATH" + [ "SV_PUNKBUSTER" ] && ETDED_OPTS="$ETDED_OPTS +set sv_punkbuster $SV_PUNKBUSTER" + [ "SERVER_CONFIG" ] && ETDED_OPTS="$ETDED_OPTS +exec $SERVER_CONFIG" + gprintf "Starting enemy-territory server: " + daemon --user et $ETDED $ETDED_OPTS & + echo + touch $LOCKFILE + ;; + stop) + # Stop daemon + gprintf "Shutting down enemy-territory server: " + killproc etded + echo + rm -f $LOCKFILE + ;; + status) + status etded + ;; + restart) + $0 stop + $0 start + ;; + reload) + $0 stop + $0 start + ;; + condrestart) + if [ -f $LOCKFILE ]; then + $0 stop + $0 start + fi + ;; + *) + gprintf "Usage: $0 {start|stop|restart|status}\n" + exit 1 +esac + +exit 0 diff --git a/enemy-territory.spec b/enemy-territory.spec new file mode 100644 index 0000000..4f0c210 --- /dev/null +++ b/enemy-territory.spec @@ -0,0 +1,237 @@ +%define groupid 65033 +%define userid 65033 +%define etpro_ver 3_2_6 +Name: enemy-territory +Version: 2.60 +Release: 4mamba +Summary: First Person Shooter, fragg'em all +Group: Applications/Games +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.castlewolfenstein.com +Source0: http://ftp.games.skynet.be/pub/wolfenstein/et-linux-%{version}.x86.run +Source1: %{name}-initscript +Source2: %{name}-etded-sysconfig +Source3: http://bani.anime.net/etpro/etpro-%{etpro_ver}.zip +Source4: http://ftp.games.skynet.be/pub/wolfenstein/et-linux-%{version}-update.x86.run +Source5: http://websec.evenbalance.com/downloads/linux/pbsetup.run +License: Distributable +BuildRoot: %{_tmppath}/et-linux-%{version}-root +BuildRequires: ImageMagick + +%description +RTCW-Enemy Territory is a free, stand-alone, downloadable multiplayer game in which players wage war as Axies or Allies in a team-based combat. + +%package client +Summary: Client for %{name} +Group: Applications/Games +Requires: %{name} = %{version} + +%description client +This package contains a client for %{name}. + +%package server +Summary: Server for %{name} +Group: Applications/Games +Requires: %{name} = %{version} + +%description server +This package contains a server for %{name}. + +%package etpro +Summary: MOD etpro for %{name} +Group: Applications/Games +Requires: %{name} = %{version} + + +%description etpro +This package contains the etpro MOD for %{name}. + +%package server-etpro +Summary: MOD etpro for %{name} server +Group: Applications/Games +Requires(pre): %{name}-server = %{version} + +%description server-etpro +This package contains the etpro MOD for %{name}-server. + +%prep +%setup -q -c -T -a3 +sh %{SOURCE0} --target . --nox11 --nochown --noexec +sh %{SOURCE4} --target . --nox11 --nochown --noexec +#sh %{SOURCE5} --target . --nox11 --nochown --noexec + +%build + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +install -d -m 755 %{buildroot}%{_datadir}/games/%{name} +install -d -m 755 %{buildroot}%{_bindir} +chmod 755 pb/*.so +cp -pr etmain %{buildroot}%{_datadir}/games/%{name} +cp -pr pb %{buildroot}%{_datadir}/games/%{name} +install -m 755 bin/Linux/x86/et.x86 %{buildroot}%{_datadir}/games/%{name}/et +install -m 755 bin/Linux/x86/etded.x86 %{buildroot}%{_datadir}/games/%{name}/etded + +# wrapper +cat > %{buildroot}%{_bindir}/et < %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF +[Desktop Entry] +Name=Enemy Territory +Comment=%{summary} +Exec=et +Icon=%{name}.png +Terminal=0 +Type=Application +Categories=Application;Game +EOF + +# data dir needed for server +install -d -m 755 %{buildroot}%{_localstatedir}/games/%{name} + +# service script +install -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/et +install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/etserver + +# install etpro MOD +cp -pr etpro %{buildroot}%{_datadir}/games/%{name} +chmod +x %{buildroot}%{_datadir}/games/%{name}/etpro/qagame.mp.i386.so + +install -d %{buildroot}%{_localstatedir}/games/%{name}/.etwolf/etpro +cp -pr %{buildroot}%{_datadir}/games/%{name}/etpro/*.{cfg,dat} \ + %{buildroot}%{_localstatedir}/games/%{name}/.etwolf/etpro +cp -pr %{buildroot}%{_datadir}/games/%{name}/etpro/maps \ + %{buildroot}%{_localstatedir}/games/%{name}/.etwolf/etpro +cp -pr %{buildroot}%{_datadir}/games/%{name}/etpro/etpromapscripts \ + %{buildroot}%{_localstatedir}/games/%{name}/.etwolf/etpro +cp -pr %{buildroot}%{_datadir}/games/%{name}/etpro/configs \ + %{buildroot}%{_localstatedir}/games/%{name}/.etwolf/etpro +#chown -R %{userid}.%{groupid} %{buildroot}%{_localstatedir}/games/%{name}/.etwolf/etpro + +ln -sf %{_localstatedir}/games/%{name}/.etwolf %{buildroot}%{_datadir}/games/%{name}/.etwolf + + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%pre server +groupadd et -g %{groupid} 2>/dev/null || true +useradd -u %{userid} -c 'Enemy Territory Daemon' \ + -d %{_localstatedir}/games/%{name} -g et \ + -s /bin/false et 2>/dev/null || true + +%post server +if [ $1 -eq 1 ]; then +# new install + install -d %{_localstatedir}/games/%{name}/.etwolf/etmain + cp -pr %{_datadir}/games/%{name}/etmain/*.{cfg,dat} \ + %{_localstatedir}/games/%{name}/.etwolf/etmain + chown -R %{userid}.%{groupid} %{_localstatedir}/games/%{name}/.etwolf/ +# (cd %{_datadir}/games/%{name} && +# ln -s %{_localstatedir}/games/%{name}/.etwolf .etwolf) +fi +exit 0 + +%preun server +# erase +if [ $1 -eq 0 ]; then + %{_initrddir}/et stop 2>/dev/null || true + chkconfig --del et + userdel et || true +fi +exit 0 + +%postun server +# update +if [ $1 -eq 1 ]; then + groupadd et -g %{groupid} 2>/dev/null || true + useradd -u %{userid} -c 'Enemy Territory Daemon' \ + -d %{_localstatedir}/games/%{name} -g et \ + -s /bin/false et 2>/dev/null || true + chkconfig et + [ $? -eq 0 ] && %{_initrddir}/et restart +fi +exit 0 + +%post server-etpro +if [ $1 -eq 1 ]; then +# new install + install -d %{_localstatedir}/games/%{name}/.etwolf/etpro + cp -pr %{_datadir}/games/%{name}/etpro/*.{cfg,dat} \ + %{_localstatedir}/games/%{name}/.etwolf/etpro + cp -pr %{_datadir}/games/%{name}/etpro/maps \ + %{_localstatedir}/games/%{name}/.etwolf/etpro + cp -pr %{_datadir}/games/%{name}/etpro/etpromapscripts \ + %{_localstatedir}/games/%{name}/.etwolf/etpro + cp -pr %{_datadir}/games/%{name}/etpro/configs \ + %{_localstatedir}/games/%{name}/.etwolf/etpro + chown -R %{userid}.%{groupid} %{_localstatedir}/games/%{name}/.etwolf/etpro +fi +exit 0 + + +%files +%defattr(-,root,root) +%dir %{_datadir}/games/%{name} +%{_datadir}/games/%{name}/pb +%{_datadir}/games/%{name}/etmain +%doc CHANGES README Docs/ + +%files client +%defattr(-,root,root) +%{_bindir}/et +%{_datadir}/games/%{name}/et +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/%{name}.png + +%files server +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/sysconfig/etserver +%attr(755,root,root) %{_initrddir}/et +%{_datadir}/games/%{name}/etded + +%files etpro +%defattr(-,root,root) +%{_datadir}/games/%{name}/etpro/* + +%files server-etpro +%defattr(-,root,root) +%{_datadir}/games/%{name}/.etwolf +%attr(-,et,et) %{_localstatedir}/games/%{name}/.etwolf +#%attr(-,et,et) %{_localstatedir}/games/%{name}/.etwolf/etpro/* + +%changelog +* Tue Feb 01 2011 Silvan Calarco 2.60-4mamba +- enemy-territory-server-etpro: added Requires(pre) for enemy-territory-server + +* Mon Feb 08 2010 Silvan Calarco 2.60-3mamba +- rebuilt to remove executable requirements + +* Fri Jan 04 2008 Silvan Calarco 2.60-2mamba +- added et-linux-2.6.0-update +- updated desktop menu icon +- etpro: update to 3.2.6 + +* Wed May 11 2005 Massimo Pintore 2.60-1qilnx +- first build.