238 lines
7.5 KiB
RPMSpec
238 lines
7.5 KiB
RPMSpec
|
%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 <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
|
||
|
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 <<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
|
||
|
|
||
|
# 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}/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 <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.
|