251 lines
7.8 KiB
RPMSpec
251 lines
7.8 KiB
RPMSpec
%define groupid 65033
|
|
%define userid 65033
|
|
%define etpro_ver 3_2_6
|
|
%define pkgver %(echo %version | tr -d .)
|
|
Name: enemy-territory
|
|
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: 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
|
|
Source5: http://websec.evenbalance.com/downloads/linux/pbsetup.run
|
|
Source6: et.sh
|
|
Source7: etded.sh
|
|
License: Distributable
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
## AUTOBUILDREQ-END
|
|
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.
|
|
|
|
%ifarch x86_64
|
|
%global __requires_exclude ^(libX11.so.*|^libXext.so.*)$
|
|
%endif
|
|
|
|
#% debug_package
|
|
|
|
%prep
|
|
%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}/%{name}
|
|
install -d -m 755 %{buildroot}%{_bindir}
|
|
chmod 755 pb/*.so
|
|
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
|
|
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
|
|
#convert -geometry 32x32 ET.xpm %{name}-32.png
|
|
#convert -geometry 16x16 ET.xpm %{name}-16.png
|
|
install -D -m 644 %{name}-48.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
|
#install -D -m 644 %{name}-32.png %{buildroot}%{_datadir}/icons/32x32/%{name}.png
|
|
#install -D -m 644 %{name}-16.png %{buildroot}%{_datadir}/icons/16x16/%{name}.png
|
|
|
|
# Create the system menu entry
|
|
mkdir -p %{buildroot}%{_datadir}/applications
|
|
cat > %{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}/%{name}
|
|
|
|
# service script
|
|
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 -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}/%{name} -g et \
|
|
-s /bin/false et 2>/dev/null || true
|
|
|
|
%post server
|
|
%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
|
|
%systemd_preun etded
|
|
if [ $1 -eq 0 ]; then
|
|
userdel et || true
|
|
fi
|
|
:
|
|
|
|
%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
|
|
fi
|
|
%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
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%dir %{_datadir}/%{name}
|
|
%{_datadir}/%{name}/pb
|
|
%{_datadir}/%{name}/etmain
|
|
#%{_datadir}/%{name}/.etwolf
|
|
%doc CHANGES README Docs/
|
|
|
|
%files client
|
|
%defattr(-,root,root)
|
|
%{_bindir}/et
|
|
%{_datadir}/%{name}/et.x86
|
|
%{_datadir}/applications/%{name}.desktop
|
|
%{_datadir}/pixmaps/%{name}.png
|
|
|
|
%files server
|
|
%defattr(-,root,root)
|
|
%{_bindir}/etded
|
|
%{_unitdir}/etded.service
|
|
%{_datadir}/%{name}/etded.x86
|
|
|
|
#%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
|
|
* 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
|
|
|
|
* Mon Feb 08 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 2.60-3mamba
|
|
- rebuilt to remove executable requirements
|
|
|
|
* Fri Jan 04 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 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 <massimo.pintore@qilinux.it> 2.60-1qilnx
|
|
- first build.
|