fortune-mod-stripped/PKGBUILD

62 lines
1.6 KiB
Text
Raw Permalink Normal View History

2025-09-01 09:20:39 +02:00
# Maintainer: Christian Schendel <doppelhelix@gmail.com>
# Contributor: Kyle Keen <keenerd@gmail.com>
# Contributor: Kevin Piche <kevin@archlinux.org>
# Contributor: Dale Blount <archlinux@dale.us>
# Contributor: George Rawlinson <grawlinson@archlinux.org>
pkgname=fortune-mod-stripped
_pkgname=fortune-mod
pkgdesc='The Fortune Cookie Program from BSD games - without cookies'
pkgver=3.24.0
pkgrel=3
url='https://github.com/shlomif/fortune-mod'
arch=(x86_64)
license=(BSD-4-Clause)
makedepends=(
cmake
rinutils
)
depends=(
glibc
recode
)
provides=("$_pkgname")
conflicts=("$_pkgname")
source=(
"$url/releases/download/$_pkgname-$pkgver/$_pkgname-$pkgver.tar.xz"
'not-a-game.patch'
)
b2sums=('378a2cee3317510d1b826a801d60b4c1aee69777a26861990435b888813d01ba46d4125d2cb588046e88009ddff0b38fc9d8b56672b6a016384b700e629cbade'
'208eb3cac94709a8b046c0eb48f41d81db7ffd93a778f509d759f364b48f616d3f13b964be31e5b84c6d60bff2342e201a1105ebdbe5d262ec2f74ab9631357b')
prepare() {
cd "$_pkgname-$pkgver"
patch -p1 -i ../not-a-game.patch
}
build() {
local cmake_options=(
-B build
-S "$_pkgname-$pkgver"
-D CMAKE_INSTALL_PREFIX=/usr
-D NO_OFFENSIVE=ON
-D LOCALDIR=/usr/share/fortune
-D COOKIEDIR=/usr/share/fortune
)
cmake "${cmake_options[@]}"
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
# This is the stripped down version. It does not include any cookies.
rm -f "$pkgdir/usr/share/fortune/"*
# license
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname" \
"$_pkgname-$pkgver/COPYING.txt"
}
# vim: set ft=sh ts=4 sw=4 et: