Ports: Add Half-Life: Opposing Force port :^)
This commit is contained in:
parent
63c5cb120b
commit
43ddefec9c
Notes:
sideshowbarker
2024-07-17 20:18:18 +09:00
Author: https://github.com/Quaker762 Commit: https://github.com/SerenityOS/serenity/commit/43ddefec9ce Pull-request: https://github.com/SerenityOS/serenity/pull/12108
2 changed files with 55 additions and 0 deletions
|
@ -141,6 +141,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
|
|||
| [`openttd-opensfx`](openttd-opensfx/) | OpenSFX audio files for OpenTTD | 1.0.1 | https://www.openttd.org/ |
|
||||
| [`opentyrian`](opentyrian/) | OpenTyrian | 84b820f | https://github.com/opentyrian/opentyrian |
|
||||
| [`opentyrian-data`](opentyrian-data/) | OpenTyrian graphics and audio | 1.0.0 | https://camanis.net/tyrian/tyrian21.zip |
|
||||
| [`opfor`](opfor/) | Half-Life: Opposing Force | 1.0.0 | https://github.com/SerenityPorts/xash3d-fwgs |
|
||||
| [`oksh`](oksh/) | oksh | 7.0 | https://github.com/ibara/oksh |
|
||||
| [`p7zip`](p7zip/) | p7zip | 17.04 | https://github.com/jinfeihan57/p7zip |
|
||||
| [`patch`](patch/) | patch (GNU) | 2.7.6 | https://savannah.gnu.org/projects/patch/ |
|
||||
|
|
54
Ports/opfor/package.sh
Executable file
54
Ports/opfor/package.sh
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port="opfor"
|
||||
version="1.0.0"
|
||||
useconfigure="true"
|
||||
depends=("SDL2" "halflife")
|
||||
workdir="hlsdk-xash3d-opfor"
|
||||
files="https://github.com/SerenityPorts/hlsdk-xash3d/archive/opfor.tar.gz xash3d_gearbox.tar.gz"
|
||||
launcher_name="Half-Life: Opposing Force"
|
||||
launcher_category="Games"
|
||||
|
||||
# This one is a bit tricky to build, so I'm going a little bit off the script....
|
||||
configure() {
|
||||
# Configure the shared object projects (client and game)
|
||||
run ./waf configure -T release
|
||||
}
|
||||
|
||||
build() {
|
||||
# Build game shared object
|
||||
run ./waf build
|
||||
}
|
||||
|
||||
install() {
|
||||
run ./waf install --destdir=${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife
|
||||
}
|
||||
|
||||
post_install() {
|
||||
# On arch-linux systems, rename is installed as perl-rename
|
||||
if command -v perl-rename &> /dev/null
|
||||
then
|
||||
rename_command=perl-rename
|
||||
else
|
||||
rename_command=rename
|
||||
fi
|
||||
# Strip the output libraries of their "lib" prefix
|
||||
pushd ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/gearbox/cl_dlls/
|
||||
"$rename_command" 's/^...//' lib*
|
||||
popd
|
||||
pushd ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/gearbox/dlls/
|
||||
"$rename_command" 's/^...//' lib*
|
||||
popd
|
||||
|
||||
# Create a launch script
|
||||
cat <<- 'EOF' > ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/opfor.sh
|
||||
#!/bin/sh
|
||||
export LD_LIBRARY_PATH=/home/anon/Games/halflife/
|
||||
scriptdir=$(dirname "$0")
|
||||
cd $scriptdir
|
||||
./xash3d -console -game gearbox
|
||||
EOF
|
||||
chmod +x ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/opfor.sh
|
||||
|
||||
echo "Please remember to copy the 'gearbox/' folder from your own Half-Life installation"
|
||||
echo "into ${SERENITY_INSTALL_ROOT}/home/anon/Games/halflife/"
|
||||
}
|
Loading…
Add table
Reference in a new issue