update to 2.60b [release 2.60b-1mamba;Wed Jan 11 2023]

This commit is contained in:
Silvan Calarco 2024-01-05 22:06:30 +01:00
parent 571f17a74a
commit ea5c2585c4
5 changed files with 118 additions and 160 deletions

View File

@ -1,69 +0,0 @@
#!/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

View File

@ -1,23 +1,28 @@
%define groupid 65033
%define userid 65033
%define etpro_ver 3_2_6
%define pkgver %(echo %version | tr -d .)
Name: enemy-territory
Version: 2.60
Release: 4mamba
Version: 2.60b
Release: 1mamba
Summary: First Person Shooter, fragg'em all
Group: Applications/Games
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.castlewolfenstein.com
Source0: http://ftp.games.skynet.be/pub/wolfenstein/et-linux-%{version}.x86.run
Source1: %{name}-initscript
URL: https://www.splashdamage.com/games/wolfenstein-enemy-territory/
Source0: https://cdn.splashdamage.com/downloads/games/wet/et%{pkgver}.x86_full.zip
Source1: etded.service
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
#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
Source6: et.sh
Source7: etded.sh
License: Distributable
BuildRoot: %{_tmppath}/et-linux-%{version}-root
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
## AUTOBUILDREQ-END
BuildRequires: ImageMagick
%description
@ -56,35 +61,38 @@ Requires(pre): %{name}-server = %{version}
%description server-etpro
This package contains the etpro MOD for %{name}-server.
%ifarch x86_64
%global __requires_exclude ^(libX11.so.*|^libXext.so.*)$
%endif
#% debug_package
%prep
%setup -q -c -T -a3
sh %{SOURCE0} --target . --nox11 --nochown --noexec
sh %{SOURCE4} --target . --nox11 --nochown --noexec
%setup -q -c -T -a0
#sh %{SOURCE0} --target . --nox11 --nochown --noexec
#sh %{SOURCE4} --target . --nox11 --nochown --noexec
#sh %{SOURCE5} --target . --nox11 --nochown --noexec
chmod +x et260b.x86_keygen_V03.run
./et260b.x86_keygen_V03.run --noexec --nox11 --target $PWD
%build
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
install -d -m 755 %{buildroot}%{_datadir}/games/%{name}
install -d -m 755 %{buildroot}%{_datadir}/%{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
cp -pr etmain %{buildroot}%{_datadir}/%{name}
cp -pr pb %{buildroot}%{_datadir}/%{name}
install -m 755 bin/Linux/x86/et.x86 %{buildroot}%{_datadir}/%{name}/et.x86
install -m 755 bin/Linux/x86/etded.x86 %{buildroot}%{_datadir}/%{name}/etded.x86
# wrapper
cat > %{buildroot}%{_bindir}/et <<EOF
#!/bin/sh
# Wrap Enemy Territory binary
cd %{_datadir}/games/%{name}
./et $*
exit $?
EOF
chmod 755 %{buildroot}%{_datadir}/games/%{name}/et
chmod 755 %{buildroot}%{_datadir}/games/%{name}/pb/pbweb.x86
chmod 755 %{buildroot}%{_bindir}/et
install -D -m0755 %{SOURCE6} %{buildroot}%{_bindir}/et
install -D -m0755 %{SOURCE7} %{buildroot}%{_bindir}/etded
chmod 755 %{buildroot}%{_datadir}/%{name}/pb/pbweb.x86
# icons
convert -geometry 48x48 ET.xpm %{name}-48.png
@ -107,29 +115,29 @@ Type=Application
Categories=Application;Game
EOF
# data dir needed for server
install -d -m 755 %{buildroot}%{_localstatedir}/games/%{name}
## data dir needed for server
#install -d -m 755 %{buildroot}%{_localstatedir}/%{name}
# service script
install -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/et
install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/etserver
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/etded.service
#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 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
#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
#ln -sf %{_localstatedir}/games/%{name}/.etwolf %{buildroot}%{_datadir}/games/%{name}/.etwolf
%clean
@ -138,29 +146,28 @@ ln -sf %{_localstatedir}/games/%{name}/.etwolf %{buildroot}%{_datadir}/games/%{n
%pre server
groupadd et -g %{groupid} 2>/dev/null || true
useradd -u %{userid} -c 'Enemy Territory Daemon' \
-d %{_localstatedir}/games/%{name} -g et \
-d %{_localstatedir}/%{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
%systemd_post etded
#if [ $1 -eq 1 ]; then
## new install
# install -d %{_localstatedir}/%{name}/.etwolf/etmain
# cp -pr %{_datadir}/%{name}/etmain/*.{cfg,dat} \
# %{_localstatedir}/%{name}/.etwolf/etmain
# chown -R %{userid}.%{groupid} %{_localstatedir}/%{name}/.etwolf/
## (cd %{_datadir}/games/%{name} &&
## ln -s %{_localstatedir}/games/%{name}/.etwolf .etwolf)
#fi
:
%preun server
# erase
%systemd_preun etded
if [ $1 -eq 0 ]; then
%{_initrddir}/et stop 2>/dev/null || true
chkconfig --del et
userdel et || true
fi
exit 0
:
%postun server
# update
@ -169,59 +176,65 @@ if [ $1 -eq 1 ]; then
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
%systemd_postun_with_restart etded
:
%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
#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
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/pb
%{_datadir}/%{name}/etmain
#%{_datadir}/%{name}/.etwolf
%doc CHANGES README Docs/
%files client
%defattr(-,root,root)
%{_bindir}/et
%{_datadir}/games/%{name}/et
%{_datadir}/%{name}/et.x86
%{_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
%{_bindir}/etded
%{_unitdir}/etded.service
%{_datadir}/%{name}/etded.x86
%files etpro
%defattr(-,root,root)
%{_datadir}/games/%{name}/etpro/*
#%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/*
#%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
* Wed Jan 11 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.60b-1mamba
- update to 2.60b
* Wed Jan 11 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.60-5mamba
- rebuilt to fix requirements for 32 bit libs
* Tue Feb 01 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.60-4mamba
- enemy-territory-server-etpro: added Requires(pre) for enemy-territory-server

3
et.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cd /usr/share/enemy-territory
./et.x86 $*

8
etded.service Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=Enemy Territory dedicated server
[Service]
ExecStart=/usr/bin/etded
[Install]
WantedBy=multi-user.target

3
etded.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cd /usr/share/enemy-territory
./etded.x86 $*