forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.sh
executable file
·49 lines (46 loc) · 1.48 KB
/
package.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env -S bash ../.port_include.sh
port='devilutionX'
version='1.5.2'
useconfigure='true'
files=(
"https://github.com/diasurgical/devilutionX/archive/refs/tags/${version}.tar.gz#c046fd23778729ce77e7f6fd1c66ba7c3e1b32a1472821c3485f0d8bd4f3b4aa"
)
depends=(
'bzip2'
'libpng'
'SDL2'
'SDL2_image'
)
configopts=(
'-DCMAKE_BUILD_TYPE=Release'
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
'-DDEVILUTIONX_SYSTEM_LIBFMT=OFF'
'-DNONET=ON'
)
install_dir='/opt/devilutionx'
launcher_name='DevilutionX'
launcher_category='&Games'
launcher_command="${install_dir}/devilutionx"
icon_file='Packaging/resources/icon_32.png'
configure() {
# TODO: Figure out why GCC doesn't autodetect that libgcc_s is needed.
if [ "${SERENITY_TOOLCHAIN}" = "GNU" ]; then
export LDFLAGS="-lgcc_s"
fi
run cmake "${configopts[@]}" .
}
install() {
run_nocd mkdir -p "${SERENITY_INSTALL_ROOT}${install_dir}/"
run cp -r devilutionx assets/ "${SERENITY_INSTALL_ROOT}${install_dir}/"
run_nocd mkdir -p "${SERENITY_INSTALL_ROOT}/usr/local/bin/"
run ln -sf "${install_dir}/devilutionx" "${SERENITY_INSTALL_ROOT}/usr/local/bin/devilutionx"
}
post_install() {
echo
echo 'DevilutionX is installed!'
echo
echo 'Make sure the DIABDAT.MPQ file from your installation CD is in the following directory:'
echo " Inside SerenityOS: ${install_dir}/"
echo " Outside SerenityOS: ${SERENITY_SOURCE_DIR}/Base${install_dir}/"
echo
}