Skip to content

Support custom install prefix in Termux by making LOCATION overrideable #29

@Manamama

Description

@Manamama

ChatGPT wrote below, after our mutual troubleshooting:

Here’s a clear GitHub issue draft for the ripMIME repo explaining the Termux problem and the minimal fix:


Title: Support custom install prefix in Termux by making LOCATION overrideable

Body:

When building and installing ripMIME on Termux, the default hardcoded install prefix causes failures because /usr/local (the default LOCATION in the Makefile) is a read-only directory in Termux’s environment.

Error observed:

install -d /usr/local/bin
install: cannot create directory ‘/usr’: Read-only file system
make: *** [Makefile:80: install] Error 1

Cause:

The Makefile uses a fixed:

LOCATION=/usr/local

which does not respect environment variables or allow specifying an alternate prefix.


Suggested fix:

Change the Makefile line to:

LOCATION ?= $(PREFIX)

This allows passing a custom install prefix dynamically via:

PREFIX=/data/data/com.termux/files/usr make install

No other hardcoded /usr/local/bin paths need replacement as the Makefile uses LOCATION for installation paths.


Quick patch command:

sed -i 's|^LOCATION=.*|LOCATION ?= $(PREFIX)|' Makefile

This simple change makes ripMIME install correctly in Termux or any other environment with a nonstandard prefix.


Thank you for considering this small but important fix to improve ripMIME’s portability!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions