You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.7 KiB
48 lines
1.7 KiB
name=nxengine
|
|
version=1006
|
|
update_url="http://nxengine.sourceforge.net/"
|
|
|
|
dlextract "http://nxengine.sourceforge.net/dl/nx-src-$version.tar.bz2" \
|
|
"cc0d1f5608bba70df86a6f5a3b4dd3bd"
|
|
download "http://www.cavestory.org/downloads/cavestoryen.zip" \
|
|
"5aad47f1cb72185d6e7f4c8c392f6b6e"
|
|
|
|
extrafile "nxengine.sh"
|
|
extrafile "nxengine.desktop"
|
|
extrafile "nxengine.png"
|
|
header_end
|
|
|
|
extract "cavestoryen.zip" '' "unzip -qd {dst} {src}"
|
|
|
|
# Some keyboards don't have an accessible backtick.
|
|
console_key="$(safe_sed $(option console_key=\`))"
|
|
sed -i -e "s/\`/$console_key/" nx/input.cpp
|
|
sed -i -e "s/\`/$console_key/" nx/console.cpp
|
|
|
|
# Allow custom CFLAGS to the Makefile
|
|
sed -i -e '/g++/s/-o/$(CFLAGS) -o/g' nx/Makefile
|
|
|
|
# Build the nx executable
|
|
make -C nx
|
|
|
|
# Install the nxengine executable
|
|
install -Dm755 nx/nx "$dir_install/$dir_prefix/lib/nxengine/nx"
|
|
|
|
# Install the necessary data
|
|
mkdir -p "$dir_install/$dir_prefix/share/nxengine"
|
|
install -m644 nx/font.ttf nx/smalfont.bmp nx/sprites.sif nx/tilekey.dat CaveStory/Doukutsu.exe "$dir_install/$dir_prefix/share/nxengine/"
|
|
cp -r CaveStory/data "$dir_install/$dir_prefix/share/nxengine/data"
|
|
|
|
# Install the run script
|
|
# Where the files will be copied to on runtime.
|
|
dir_runtime="$(option dir_runtime=\$HOME/.nxengine)"
|
|
sed -i -e "s/%PREFIX%/$(safe_sed "$dir_prefix")/" \
|
|
-e "s/%RUNTIME%/$(safe_sed "$dir_runtime")/" \
|
|
nxengine.sh
|
|
install -Dm755 nxengine.sh "$dir_install/$dir_prefix/bin/nxengine"
|
|
|
|
# Install desktop file and icon
|
|
install -Dm644 nxengine.png "$dir_install/$dir_prefix/share/pixmaps/nxengine.png"
|
|
install -Dm644 nxengine.desktop "$dir_install/$dir_prefix/share/applications/nxengine.desktop"
|
|
|
|
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:
|
|
|