summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2023-02-01 21:38:44 +0100
committerAndreas Kling <kling@serenityos.org>2023-02-02 14:38:26 +0100
commitdcf33f9b8f0e0a84954acc85330f0634a6e62efb (patch)
treece6686833667a8f9234922c5c58c8e12c3d90333 /Ports
parent69b94e4235c1869ea3963144a8898b87d61c0b8e (diff)
downloadserenity-dcf33f9b8f0e0a84954acc85330f0634a6e62efb.zip
Ports: Add bind mount automatically for Quake3
We need a `wxallowed` bind mount for the `ioquake3` binary to be able to compile and run its executable scripts in memory. Instead of instructing the user how to do so in `/etc/fstab`, we can now use the fancy `/etc/fstab.d` facility :^)
Diffstat (limited to 'Ports')
-rwxr-xr-xPorts/quake3/package.sh25
1 files changed, 15 insertions, 10 deletions
diff --git a/Ports/quake3/package.sh b/Ports/quake3/package.sh
index c9849a7b3e..fa43e63b5b 100755
--- a/Ports/quake3/package.sh
+++ b/Ports/quake3/package.sh
@@ -12,23 +12,28 @@ launcher_category="Games"
launcher_command=/usr/local/games/quake3/ioquake3
icon_file="misc/quake3.png"
+install_dir='/usr/local/games/quake3'
+
install() {
- run make COPYDIR=${SERENITY_INSTALL_ROOT}/usr/local/games/quake3/ copyfiles
+ run make COPYDIR=${SERENITY_INSTALL_ROOT}${install_dir}/ copyfiles
}
post_install() {
- # Let's create a more Serenity friendly `autoexec.cfg` file :^)
- cat <<- 'EOF' > ${SERENITY_INSTALL_ROOT}/usr/local/games/quake3/baseq3/autoexec.cfg
+ # Allow ioquake3 to use anonymous executable memory
+ bin_path="${install_dir}/ioquake3"
+ mkdir -p "${SERENITY_INSTALL_ROOT}/etc/fstab.d"
+ echo "${bin_path} ${bin_path} bind bind,nodev,nosuid,wxallowed" > "${SERENITY_INSTALL_ROOT}/etc/fstab.d/${port}"
+
+ # Let's create a more Serenity friendly `autoexec.cfg` file :^)
+ cat <<- 'EOF' > ${SERENITY_INSTALL_ROOT}${install_dir}/baseq3/autoexec.cfg
set cl_renderer "opengl1"
set r_fullscreen "0"
set cg_drawfps "1"
EOF
-echo ""
-echo ""
-echo "==== Post installation instructions ===="
-echo "Please remember to install baseq3 from your Quake3 install"
-echo "into /usr/local/games/quake3/"
-echo "Don't forget to add the following to Base/etc/fstab/:"
-echo "/usr/local/games/quake3 /usr/local/games/quake3 bind bind,nodev,nosuid,wxallowed"
+ echo
+ echo
+ echo '==== Post installation instructions ===='
+ echo 'Please remember to install baseq3 from your Quake3 install'
+ echo "into ${install_dir}/"
}