From fe29305d05673f08cd61eca6f1513fb6d9014f39 Mon Sep 17 00:00:00 2001 From: Alexander Hill Date: Sun, 11 Jan 2026 18:31:57 -0500 Subject: [PATCH] Added fortune --- STATUS.md | 2 +- rootbuild.sh | 3 ++- sources/fortune-mod/fortune-mod.spec | 38 ++++++++++++++++++++++++++++ sources/fortune-mod/maple | 10 ++++++++ 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 sources/fortune-mod/fortune-mod.spec create mode 100644 sources/fortune-mod/maple diff --git a/STATUS.md b/STATUS.md index b2198ef..aa8c89b 100644 --- a/STATUS.md +++ b/STATUS.md @@ -19,7 +19,7 @@ Definitions: | `diffutils` | Yes | Yes | | `findutils` | Yes | Yes | | `flex` | Yes | Yes | -| `fortune-mod` | +| `fortune-mod` | Yes | Yes | | `gettext` | | `grep` | Yes | Yes | | `groff` | Yes | Yes | diff --git a/rootbuild.sh b/rootbuild.sh index 3143403..fbc6ab0 100755 --- a/rootbuild.sh +++ b/rootbuild.sh @@ -35,10 +35,11 @@ echo "Done!" # NOTE: nasm requires autoconf and automake to build. ~ahill # NOTE: dash requires flex and mawk to build. ~ahill # NOTE: libelf requires zlib to build. ~ahill +# NOTE: fortune-mod requires cmake to build. ~ahill cd /maple LAYER0="byacc bzip2 coreutils diffutils findutils grep gzip libressl m4 make mawk muon musl patch perl pkgconf sed tar xz zlib" LAYER1="autoconf automake flex groff libarchive libelf libtool" -LAYER2="dash nasm cmake" +LAYER2="dash nasm cmake fortune-mod" PACKAGES="$LAYER0 $LAYER1 $LAYER2" for pkg in $PACKAGES; do treetap fetch /maple/sources/$pkg/$pkg.spec diff --git a/sources/fortune-mod/fortune-mod.spec b/sources/fortune-mod/fortune-mod.spec new file mode 100644 index 0000000..dd82d62 --- /dev/null +++ b/sources/fortune-mod/fortune-mod.spec @@ -0,0 +1,38 @@ +# Maintainer: Alexander Hill +SRC_HASH="1f387877254e95eab61f937257b42609f29b994ef0571531655bbfc3a2ac74ac" +SRC_NAME="fortune-mod" +SRC_URL="https://github.com/shlomif/fortune-mod/releases/download/fortune-mod-3.24.0/fortune-mod-3.24.0.tar.xz" +SRC_VERSION="3.24.0" + +build() { + tar xf ../$SRC_FILENAME + # NOTE: There is no other way to prevent fortune from installing itself + # under /games, so we have to modify the CMakeLists in this case. + # ~ahill + sed -i "/fortune\/fortune.c/{n; s/games/bin/}" fortune-mod-$SRC_VERSION/CMakeLists.txt + # NOTE: Similarly, the same thing happens for man pages. ~ahill + sed -i "s|share/man/man|usr/share/man/man|" fortune-mod-$SRC_VERSION/cmake/Shlomif_Common.cmake + cat fortune-mod-3.24.0/cmake/Shlomif_Common.cmake + # NOTE: I don't agree with the offensive jokes included in this distribution + # but they are hidden behind the -o flag, and I want them to be seen + # as "unfunny" before the next generation thinks they're funny. ~ahill + cmake \ + -B build-$SRC_VERSION \ + -S fortune-mod-$SRC_VERSION \ + -DCMAKE_INSTALL_PREFIX=$TT_INSTALLDIR \ + -DCOOKIEDIR=$TT_INSTALLDIR/usr/share/games/fortunes \ + -DNO_OFFENSIVE=OFF + cmake --build build-$SRC_VERSION --parallel $TT_PROCS + # Finally, we add our custom fortunefile into the mix. ~ahill + cp ../maple . + # NOTE: Is there a better way to do this? This probably won't survive + # cross-compilation. ~ahill + ./build-$SRC_VERSION/strfile maple +} + +package() { + cmake --install build-$SRC_VERSION --parallel $TT_PROCS + cp maple $TT_INSTALLDIR/usr/share/games/fortunes/ + cp maple.dat $TT_INSTALLDIR/usr/share/games/fortunes/ + ln -sf maple $TT_INSTALLDIR/usr/share/games/fortunes/maple.u8 +} diff --git a/sources/fortune-mod/maple b/sources/fortune-mod/maple new file mode 100644 index 0000000..86abb9a --- /dev/null +++ b/sources/fortune-mod/maple @@ -0,0 +1,10 @@ +I am the power user and the daemons are my friend! + -- Alex +% +On a scale from telegraph to Pony Express, the carrier pigeons are freezing +mid-transit in this storm. + -- Alex +% +I'm just raw dogging it with the text editor. + -- Alex +%