From 554317e00adbffc89f1c33b99e2cd049d4e9d53c Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Fri, 18 Nov 2022 22:40:20 +0100 Subject: [PATCH] Do something offensive --- .SRCINFO | 20 ++++++++++++++++++++ PKGBUILD | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ not-a-game.patch | 11 +++++++++++ 3 files changed, 80 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD create mode 100644 not-a-game.patch diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..e44eac2 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = fortune-mod-off + pkgdesc = The Fortune Cookie Program from BSD games, with offensive quotes! + pkgver = 3.14.1 + pkgrel = 2 + url = https://www.shlomifish.org/open-source/projects/fortune-mod/ + arch = x86_64 + license = BSD + makedepends = cmake + makedepends = rinutils + depends = glibc + depends = recode + conflicts = fortune-mod + source = https://github.com/shlomif/fortune-mod/releases/download/fortune-mod-3.14.1/fortune-mod-3.14.1.tar.xz + source = not-a-game.patch + sha512sums = 0de0ec033ffc35a7a9ec1a549e6dac425757ec5fcc718c772f0a4e548d23c46451af4a90b0ac548f2ab60d68856ca0fa5e8f10930efe6b199e96b2cc1c568810 + sha512sums = c4ef10c6d7bdb15ceec020d27e11c489ff56ed573b7efc0cf7465026514f153f789444cd7e2996d0fd9bb0f923c4eeeaf0eaa46a0bfacbc36712917e4f5d6c04 + b2sums = a62d4056cdceef14f1d63dbc8b98bbd88098c64d0020b949ecc8e6006f1a4b1369211ac8b87a33db60b238cd7e6d3d6f3c4d2e59933a6cf0bd3fa54c439c4330 + b2sums = 5283fde623cd0d304f073d59ff648d671323d8638876c629e8e8f175de00c3d9a1f807f0a9dfce3d9c9a56299dc1824062b013a4ce0541ee5fcea97c53f6ecec + +pkgname = fortune-mod-off diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..e458f1c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Sam Therapy +# Contributor: Kyle Keen +# Contributor: Kevin Piche +# Contributor: Dale Blount +# Contributor: George Rawlinson + +pkgname=fortune-mod-off +pkgver=3.14.1 +pkgrel=2 +pkgdesc='The Fortune Cookie Program from BSD games, with offensive quotes!' +arch=('x86_64') +url='https://www.shlomifish.org/open-source/projects/fortune-mod/' +license=('BSD') +depends=('glibc' 'recode') +makedepends=('cmake' 'rinutils') +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=('0de0ec033ffc35a7a9ec1a549e6dac425757ec5fcc718c772f0a4e548d23c46451af4a90b0ac548f2ab60d68856ca0fa5e8f10930efe6b199e96b2cc1c568810' + 'c4ef10c6d7bdb15ceec020d27e11c489ff56ed573b7efc0cf7465026514f153f789444cd7e2996d0fd9bb0f923c4eeeaf0eaa46a0bfacbc36712917e4f5d6c04') +b2sums=('a62d4056cdceef14f1d63dbc8b98bbd88098c64d0020b949ecc8e6006f1a4b1369211ac8b87a33db60b238cd7e6d3d6f3c4d2e59933a6cf0bd3fa54c439c4330' + '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" +} diff --git a/not-a-game.patch b/not-a-game.patch new file mode 100644 index 0000000..c3868fc --- /dev/null +++ b/not-a-game.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -154,7 +154,7 @@ ENDMACRO() + my_exe( + "fortune" + "fortune/fortune.c" +- "games" ++ "bin" + ) + my_exe( +