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.
52 lines
1.9 KiB
52 lines
1.9 KiB
name=nxengine
|
|
version=1006
|
|
update_url='http://nxengine.sourceforge.net/'
|
|
|
|
define_option 'dir_runtime=$HOME/.nxengine: The directory used to store the nxengine configuration and save files.'
|
|
define_option 'console_key=`: The key used to access the debug console.'
|
|
|
|
dlextract "http://nxengine.sourceforge.net/dl/nx-src-$version.tar.bz2" \
|
|
'cc0d1f5608bba70df86a6f5a3b4dd3bd'
|
|
download "http://www.cavestory.org/downloads/cavestoryen.zip" \
|
|
'5aad47f1cb72185d6e7f4c8c392f6b6e'
|
|
|
|
extrafile "$name.sh"
|
|
extrafile "$name.desktop"
|
|
extrafile "$name.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/$dir_libdir/$name/nx"
|
|
|
|
# Install the necessary data
|
|
install -Dm644 -t "$dir_install/$dir_prefix/$dir_datadir/$name" nx/font.ttf nx/smalfont.bmp nx/sprites.sif nx/tilekey.dat CaveStory/Doukutsu.exe
|
|
cp -a CaveStory/data "$dir_install/$dir_prefix/$dir_datadir/$name/data"
|
|
|
|
# Install the run script
|
|
# Where the files will be copied to on runtime.
|
|
dir_runtime="$(option =dir_runtime)"
|
|
sed -i -e "s/%PREFIX%/$(safe_sed "$dir_prefix")/" \
|
|
-e "s/%RUNTIME%/$(safe_sed "$dir_runtime")/" \
|
|
-e "s/%LIBDIR%/$(safe_sed "$dir_libdir")/" \
|
|
-e "s/%DATADIR%/$(safe_sed "$dir_datadir")/" \
|
|
nxengine.sh
|
|
install -Dm755 "$name.sh" "$dir_install/$dir_prefix/$dir_bindir/$name"
|
|
|
|
# Install desktop file and icon
|
|
install -Dm644 "$name.png" "$dir_install/$dir_prefix/$dir_datadir/pixmaps/$name.png"
|
|
install -Dm644 "$name.desktop" "$dir_install/$dir_prefix/$dir_datadir/applications/$name.desktop"
|
|
|
|
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:
|
|
|