Skip to content

Conversation

@IntinteDAO
Copy link
Contributor

  • Fix audio
  • Installer now install binary to bin instead games directory
  • Fix finding game configuration on startup
  • Fix detecting game data
  • Fix menu entry
  • Compilation now works on all cores

The first version of Trigger Rally marked my beginnings in creating packages, and I made many mistakes. I decided to fix them.

@robertkirkman


termux_step_make_install(){
install -Dm644 -t "${TERMUX_PREFIX}/share/applications" "${TERMUX_PKG_BUILDER_DIR}/trigger-rally.desktop"
install -Dm644 "$TERMUX_PKG_SRCDIR/data/icon/trigger-16.png" "$TERMUX_PREFIX/share/icons/hicolor/16x16/apps/trigger-rally.png"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be easy for you to make a for loop that does this?

local size
for size in 16 22 24 32 36 48 64 72 96 192 256; do
	install -Dm644 "$TERMUX_PKG_SRCDIR/data/icon/trigger-${size}.png" \
		"$TERMUX_PREFIX/share/icons/hicolor/${size}x${size}/apps/trigger-rally.png"
done
install -Dm644 "$TERMUX_PKG_SRCDIR/data/icon/trigger-rally-icons.svg" \
	"$TERMUX_PREFIX/share/icons/hicolor/scalable/apps/trigger-rally.svg"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, Thanks

export OPTIMS=""
cd src
make install
make -j $TERMUX_PKG_MAKE_PROCESSES install bindir=$TERMUX_PREFIX/bin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be here, or can termux_step_make_install() be renamed to termux_step_post_make_install() and this changed to just export bindir="$TERMUX_PREFIX/bin"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also tried this and I failed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to do this soon, after I help in other PRs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to do this soon, after I help in other PRs

Ez, we have time

termux_step_pre_configure(){
export LDFLAGS+=" -Wl,--no-as-needed,-lOpenSLES,--as-needed"
export OPTIMS=""
cd src
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be changed to TERMUX_PKG_SRCDIR+="/src", like in packages like fact++?

https://github.com/termux/termux-packages/blob/8f831af7d6f0eea3ed3fd4aed8f881c7bff13b67/packages/fact%2B%2B/build.sh#L15

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried and I failed.

TERMUX_PKG_REVISION=11
TERMUX_PKG_SRCURL=https://netcologne.dl.sourceforge.net/project/trigger-rally/trigger-${TERMUX_PKG_VERSION}/trigger-rally-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7f086e13d142b8bb07e808ab9111e5553309c1413532f56c754ce3cfa060cb04
TERMUX_PKG_DEPENDS="glew, libphysfs, libtinyxml2, libxi, libxinerama, libxxf86vm, make, ndk-multilib, openal-soft, openalut, pulseaudio, sdl2, sdl2-image"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it depend on ndk-multilib? that is a bit strange

@robertkirkman
Copy link
Member

robertkirkman commented Oct 23, 2025

Basically, this build.sh appears to contain working implementations of all my suggested changes:

TERMUX_PKG_HOMEPAGE=https://trigger-rally.sourceforge.io
TERMUX_PKG_DESCRIPTION="A free 3D rally car racing game"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@fervi"
TERMUX_PKG_VERSION=0.6.6.1
TERMUX_PKG_REVISION=11
TERMUX_PKG_SRCURL=https://netcologne.dl.sourceforge.net/project/trigger-rally/trigger-${TERMUX_PKG_VERSION}/trigger-rally-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7f086e13d142b8bb07e808ab9111e5553309c1413532f56c754ce3cfa060cb04
TERMUX_PKG_DEPENDS="glew, libphysfs, libtinyxml2, libxi, libxinerama, libxxf86vm, make, openal-soft, openalut, pulseaudio, sdl2, sdl2-image"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="bindir=$TERMUX_PREFIX/bin"

termux_step_pre_configure(){
	TERMUX_PKG_SRCDIR+="/src"
	TERMUX_PKG_BUILDDIR="$TERMUX_PKG_SRCDIR"
	export LDFLAGS+=" -Wl,--no-as-needed,-lOpenSLES,--as-needed"
	export OPTIMS=""
}

termux_step_post_make_install(){
	TERMUX_PKG_SRCDIR="${TERMUX_PKG_SRCDIR%/*}"
	local size
	for size in 16 22 24 32 36 48 64 72 96 192 256; do
		install -Dm644 "$TERMUX_PKG_SRCDIR/data/icon/trigger-${size}.png" \
			"$TERMUX_PREFIX/share/icons/hicolor/${size}x${size}/apps/trigger-rally.png"
	done
	install -Dm644 "$TERMUX_PKG_SRCDIR/data/icon/trigger-rally-icons.svg" \
		"$TERMUX_PREFIX/share/icons/hicolor/scalable/apps/trigger-rally.svg"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants