Skip to content

Commit

Permalink
predict: enable package
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Williams <[email protected]>

Co-authored-by: Chongyun Lee <[email protected]>

Co-authored-by: TomIO <[email protected]>
  • Loading branch information
2096779623 and TomJo2000 committed Jun 17, 2024
1 parent 74a6454 commit 932cb3e
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 193 deletions.
67 changes: 0 additions & 67 deletions disabled-packages/predict/build.sh

This file was deleted.

10 changes: 0 additions & 10 deletions disabled-packages/predict/clients-kep_reload-kep_reload.c.patch

This file was deleted.

53 changes: 0 additions & 53 deletions disabled-packages/predict/predict-g1yyh.c.patch

This file was deleted.

29 changes: 0 additions & 29 deletions disabled-packages/predict/predict.c.patch

This file was deleted.

5 changes: 0 additions & 5 deletions disabled-packages/predict/predict.h.patch

This file was deleted.

13 changes: 0 additions & 13 deletions disabled-packages/predict/utils-fodtrack-0.1-fodtrack.c.patch

This file was deleted.

16 changes: 0 additions & 16 deletions disabled-packages/predict/utils-moontracker-moontracker.c.patch

This file was deleted.

34 changes: 34 additions & 0 deletions packages/predict/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
TERMUX_PKG_HOMEPAGE=https://www.qsl.net/kd2bd/predict.html
TERMUX_PKG_DESCRIPTION="A Satellite Tracking/Orbital Prediction Program"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.3.1
TERMUX_PKG_SRCURL=https://www.qsl.net/kd2bd/predict-${TERMUX_PKG_VERSION}-termux.tar.gz
TERMUX_PKG_SHA256=6eecccb21117e6ae57941659ac5d1d5f8cf99103ec8448e4fd8c076620bbd77b
TERMUX_PKG_DEPENDS="ncurses, ncurses-ui-libs,play-audio,wget"
TERMUX_PKG_GROUPS="science"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true

termux_step_pre_configure() {
rm ${TERMUX_PKG_SRCDIR}/configure
}

termux_step_make() {
echo "char *predictpath={\"$TERMUX_PREFIX/opt/predict/\"}, soundcard=1, *version={\"$(cat .version)\"};" > predict.h
$CC $CFLAGS $CPPFLAGS $LDFLAGS -Wall -Wno-deprecated-non-prototype predict.c -lm -lncurses -o predict
}

termux_step_make_install() {
mkdir -p $TERMUX_PREFIX/opt/predict

install -Dm700 predict "$TERMUX_PREFIX"/opt/predict/predict
install -Dm700 kepupdate "$TERMUX_PREFIX"/opt/predict/kepupdate
cp -r ./default "$TERMUX_PREFIX"/opt/predict/
cp -r ./vocalizer "$TERMUX_PREFIX"/opt/predict/

gzip -c "$PWD"/docs/man/predict.1 > "$TERMUX_PREFIX"/share/man/man1/predict.1.gz

ln -sfr "$TERMUX_PREFIX"/opt/predict/predict $TERMUX_PREFIX/bin/predict
ln -sfr "$TERMUX_PREFIX"/opt/predict/kepupdate $TERMUX_PREFIX/bin/kepupdate
}

0 comments on commit 932cb3e

Please sign in to comment.