# Maintainer: Sam Therapy # Contributor: George Rawlinson # Contributor: Kyle Keen # Contributor: Kevin Piche # Contributor: Dale Blount pkgname=fortune-mod-off pkgver=3.22.0 pkgrel=1 pkgdesc='The Fortune Cookie Program from BSD games, with the offensive quotes added back in' arch=('x86_64') url='https://www.shlomifish.org/open-source/projects/fortune-mod/' license=('BSD-4-Clause-UC') depends=('glibc' 'recode') makedepends=('cmake' 'rinutils') provides=('fortune-mod') conflicts=('fortune-mod') source=("https://github.com/shlomif/fortune-mod/releases/download/${pkgname/-off/}-$pkgver/${pkgname/-off/}-$pkgver.tar.xz" 'not-a-game.patch') sha512sums=('54726bad10a986b71a98de6eaed2ec56bbd28aeb245eea04254f2aa84fa4658d3bac148a0d1f3b8f44ed539b3a4d40379fc9d6438a1dba419a5c05a3180e3537' 'c4ef10c6d7bdb15ceec020d27e11c489ff56ed573b7efc0cf7465026514f153f789444cd7e2996d0fd9bb0f923c4eeeaf0eaa46a0bfacbc36712917e4f5d6c04') b2sums=('9edddea4c059314a22351bf088035284cf74983c714165bf52e50f1de00a300f3d04dc4e510ca8b4f3d78c89a4523e7b413a40ca4d6924c0fe94d3f11319c1d4' '5283fde623cd0d304f073d59ff648d671323d8638876c629e8e8f175de00c3d9a1f807f0a9dfce3d9c9a56299dc1824062b013a4ce0541ee5fcea97c53f6ecec') prepare() { cd "${pkgname/-off/}-$pkgver" patch -p1 -i ../not-a-game.patch } build() { cmake \ -B build \ -S "${pkgname/-off/}-$pkgver" \ -D CMAKE_INSTALL_PREFIX=/usr \ -D LOCALDIR=/usr/share/fortune \ -D COOKIEDIR=/usr/share/fortune cmake --build build } package() { DESTDIR="$pkgdir" cmake --install build # i'd love to know why this command exists *shrugs* rm -vf "$pkgdir/usr/share/fortune/"*.u8 # license install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" "${pkgname/-off/}-$pkgver/COPYING.txt" }