distribution/packages/games/emulators/openbor/package.mk
2022-04-26 06:04:52 -04:00

37 lines
1.6 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
# Copyright (C) 2021-present 351ELEC (https://github.com/351ELEC)
# Copyright (C) 2022-present Fewtarius
PKG_NAME="openbor"
PKG_VERSION="7f6f17507078848be625e6d1c1b4f41823151387"
PKG_ARCH="any"
PKG_SITE="https://github.com/DCurrent/openbor"
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="toolchain SDL2 libogg libvorbisidec libvpx libpng"
PKG_SHORTDESC="OpenBOR is the ultimate 2D side scrolling engine for beat em' ups, shooters, and more!"
PKG_LONGDESC="OpenBOR is the ultimate 2D side scrolling engine for beat em' ups, shooters, and more!"
PKG_TOOLCHAIN="make"
GET_HANDLER_SUPPORT="git"
pre_configure_target() {
PKG_MAKE_OPTS_TARGET="BUILD_LINUX_${ARCH}=1 -C ${PKG_BUILD}/engine SDKPATH=${SYSROOT_PREFIX} PREFIX=${TARGET_NAME}"
cd ${PKG_BUILD}
#sed -i "s|device->mappings\[SDID_START\] = SDL_CONTROLLER_BUTTON_START;|device->mappings\[SDID_START\] = SDL_CONTROLLER_BUTTON_BACK;|g" engine/sdl/control.c
#sed -i "s|device->mappings\[SDID_SCREENSHOT\] = SDL_CONTROLLER_BUTTON_BACK;|device->mappings\[SDID_SCREENSHOT\] = SDL_CONTROLLER_BUTTON_START;|g" engine/sdl/control.c
sed -i "s|-Werror||g" engine/Makefile
}
pre_make_target() {
cd ${PKG_BUILD}/engine
./version.sh
}
makeinstall_target() {
mkdir -p ${INSTALL}/usr/bin
cp OpenBOR ${INSTALL}/usr/bin/OpenBOR
cp ${PKG_DIR}/sources/start_OpenBOR.sh ${INSTALL}/usr/bin
chmod 0777 ${INSTALL}/usr/bin/*
mkdir -p ${INSTALL}/usr/config/openbor
cp ${PKG_DIR}/config/master.cfg ${INSTALL}/usr/config/openbor/master.cfg
}