|
| 1 | +TERMUX_PKG_HOMEPAGE=https://github.com/lfdevs/anland-termux |
| 2 | +TERMUX_PKG_DESCRIPTION="Anland display daemon and session helpers for Termux" |
| 3 | +TERMUX_PKG_LICENSE="MIT" |
| 4 | +TERMUX_PKG_MAINTAINER="@lfdevs" |
| 5 | +TERMUX_PKG_VERSION="4.1.0" |
| 6 | +TERMUX_PKG_SRCURL=git+https://github.com/lfdevs/anland-termux.git |
| 7 | +TERMUX_PKG_GIT_BRANCH=termux |
| 8 | +_COMMIT=79ffe08df8b064316e2532dcd4ab427001d0af99 |
| 9 | +TERMUX_PKG_AUTO_UPDATE=false |
| 10 | +TERMUX_PKG_SUGGESTS="weston, proot-distro" |
| 11 | + |
| 12 | +termux_step_post_get_source() { |
| 13 | + if [ -n "${_COMMIT}" ]; then |
| 14 | + if git -C "$TERMUX_PKG_SRCDIR" rev-parse --is-shallow-repository | grep -q true; then |
| 15 | + git -C "$TERMUX_PKG_SRCDIR" fetch --unshallow |
| 16 | + fi |
| 17 | + git -C "$TERMUX_PKG_SRCDIR" checkout "$_COMMIT" |
| 18 | + fi |
| 19 | +} |
| 20 | + |
| 21 | +termux_step_make() { |
| 22 | + $CC $CPPFLAGS $CFLAGS \ |
| 23 | + -Wall -Wextra -Wpedantic -std=c11 \ |
| 24 | + "$TERMUX_PKG_SRCDIR/termux/anland/anland.c" \ |
| 25 | + "$TERMUX_PKG_SRCDIR/termux/anland/common/socket_utils.c" \ |
| 26 | + -o anland \ |
| 27 | + $LDFLAGS |
| 28 | +} |
| 29 | + |
| 30 | +termux_step_make_install() { |
| 31 | + install -Dm700 anland "$TERMUX_PREFIX/bin/anland" |
| 32 | + install -Dm700 "$TERMUX_PKG_SRCDIR/scripts/anland-native-session.sh" \ |
| 33 | + "$TERMUX_PREFIX/bin/anland-native-session" |
| 34 | + install -Dm700 "$TERMUX_PKG_SRCDIR/scripts/anland-proot-session.sh" \ |
| 35 | + "$TERMUX_PREFIX/bin/anland-proot-session" |
| 36 | + |
| 37 | + install -Dm600 "$TERMUX_PKG_SRCDIR/README.md" \ |
| 38 | + "$TERMUX_PREFIX/share/doc/anland/README.md" |
| 39 | + install -Dm600 "$TERMUX_PKG_SRCDIR/termux/anland/README.md" \ |
| 40 | + "$TERMUX_PREFIX/share/doc/anland/README.daemon.md" |
| 41 | + install -Dm600 "$TERMUX_PKG_SRCDIR/scripts/README.md" \ |
| 42 | + "$TERMUX_PREFIX/share/doc/anland/README.scripts.md" |
| 43 | +} |
0 commit comments