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.
53 lines
1.9 KiB
53 lines
1.9 KiB
9 years ago
|
name=nxengine
|
||
|
version=1006
|
||
9 years ago
|
update_url='http://nxengine.sourceforge.net/'
|
||
|
|
||
8 years ago
|
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'
|
||
9 years ago
|
|
||
|
dlextract "http://nxengine.sourceforge.net/dl/nx-src-$version.tar.bz2" \
|
||
9 years ago
|
'cc0d1f5608bba70df86a6f5a3b4dd3bd'
|
||
9 years ago
|
download "http://www.cavestory.org/downloads/cavestoryen.zip" \
|
||
9 years ago
|
'5aad47f1cb72185d6e7f4c8c392f6b6e'
|
||
9 years ago
|
|
||
9 years ago
|
extrafile "$name.sh"
|
||
|
extrafile "$name.desktop"
|
||
|
extrafile "$name.png"
|
||
9 years ago
|
header_end
|
||
|
|
||
9 years ago
|
extract 'cavestoryen.zip' '' 'unzip -qd {dst} {src}'
|
||
9 years ago
|
|
||
|
# Some keyboards don't have an accessible backtick.
|
||
9 years ago
|
console_key="$(safe_sed $(option =console_key))"
|
||
9 years ago
|
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
|
||
9 years ago
|
install -Dm755 nx/nx "$dir_install/$dir_prefix/$dir_libdir/$name/nx"
|
||
9 years ago
|
|
||
|
# Install the necessary data
|
||
9 years ago
|
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"
|
||
9 years ago
|
|
||
|
# Install the run script
|
||
|
# Where the files will be copied to on runtime.
|
||
9 years ago
|
dir_runtime="$(option =dir_runtime)"
|
||
8 years ago
|
sed -i -e "s/%PREFIX%/$(safe_sed "$dir_sysroot/$dir_prefix")/" \
|
||
9 years ago
|
-e "s/%RUNTIME%/$(safe_sed "$dir_runtime")/" \
|
||
9 years ago
|
-e "s/%LIBDIR%/$(safe_sed "$dir_libdir")/" \
|
||
|
-e "s/%DATADIR%/$(safe_sed "$dir_datadir")/" \
|
||
9 years ago
|
nxengine.sh
|
||
9 years ago
|
install -Dm755 "$name.sh" "$dir_install/$dir_prefix/$dir_bindir/$name"
|
||
9 years ago
|
|
||
|
# Install desktop file and icon
|
||
9 years ago
|
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"
|
||
9 years ago
|
|
||
8 years ago
|
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:
|