Browse Source

fortune: Add package

android-5
Fredrik Fornwall 9 years ago
parent
commit
a31c9bf406
  1. 24
      packages/fortune/build.sh
  2. 12
      packages/fortune/fortune.c.patch

24
packages/fortune/build.sh

@ -0,0 +1,24 @@
TERMUX_PKG_HOMEPAGE=https://www.fefe.de/fortune/
TERMUX_PKG_DESCRIPTION="Revealer of fotunes"
TERMUX_PKG_VERSION=1.2
TERMUX_PKG_SRCURL=http://dl.fefe.de/fortune-${TERMUX_PKG_VERSION}.tar.bz2
termux_step_make_install () {
cd $TERMUX_PKG_SRCDIR
$CC $CFLAGS fortune.c -o $TERMUX_PREFIX/bin/fortune
mkdir -p $TERMUX_PREFIX/share/man/man6
cp debian/fortune.6 $TERMUX_PREFIX/share/man/man6/
local TARFILE=$TERMUX_PKG_CACHEDIR/f.tar.gz
if [ ! -f $TARFILE ]; then
curl --retry 3 -L -o $TARFILE http://http.debian.net/debian/pool/main/f/fortune-mod/fortune-mod_1.99.1.orig.tar.gz
fi
cd $TERMUX_PKG_TMPDIR
mkdir datfiles
cd datfiles
tar xf $TARFILE
cd fortune-mod-1.99.1/datfiles
rm -Rf html off Makefile
mkdir -p $TERMUX_PREFIX/share/games/fortunes
cp * $TERMUX_PREFIX/share/games/fortunes
}

12
packages/fortune/fortune.c.patch

@ -0,0 +1,12 @@
diff -u -r ../fortune-1.2/fortune.c ./fortune.c
--- ../fortune-1.2/fortune.c 2008-02-15 08:20:30.000000000 -0500
+++ ./fortune.c 2016-04-12 04:08:49.426592095 -0400
@@ -51,7 +51,7 @@
#endif
#define VERSION "1.0"
-#define FORTUNEDIR "/usr/share/games/fortunes"
+#define FORTUNEDIR "@TERMUX_PREFIX@/share/games/fortunes"
struct option const long_options[] =
{
Loading…
Cancel
Save