void-packages/srcpkgs/fortune-mod/template
Đoàn Trần Công Danh 9978e00086 srcpkgs: remove patch_args=-Np1 en-mass
git grep -l '^patch_args=.*p1' 'srcpkgs/*/template'  |
	xargs -r sed -i '/^patch_args=/d'
2021-06-20 13:17:29 +07:00

37 lines
1.2 KiB
Bash

# Template file for 'fortune-mod'
pkgname=fortune-mod
version=1.99.1
revision=6
hostmakedepends="recode"
makedepends="recode-devel"
short_desc="Implementation of the BSDGames 'fortune' program"
maintainer="Tj Vanderpoel (bougyman) <tj@rubyists.com>"
license="BSD-4-Clause-UC"
homepage="http://www.redellipse.net/code/fortune"
distfiles="${DEBIAN_SITE}/main/f/fortune-mod/${pkgname}_${version}.orig.tar.gz"
checksum=fc51aee1f73c936c885f4e0f8b6b48f4f68103e3896eaddc6a45d2b71e14eace
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" fortune-mod"
_strfile="STRFILE=/usr/bin/strfile"
fi
do_build() {
vsed -i "s|^CFLAGS=.*|CFLAGS=${CFLAGS} -fsigned-char \$(DEFINES)|" Makefile
vsed -i "s|^LDFLAGS=.*|LDFLAGS=${LDFLAGS}|" Makefile
vsed -i "s;u_int;uint;" util/strfile.h
case "$XBPS_TARGET_MACHINE" in
*-musl)
vsed -e "s;-DBSD_REGEX;-DPOSIX_REGEX;" -i Makefile
esac
make CC=$CC COOKIEDIR=/usr/share/fortunes $_strfile
sed -n '/[*][[:space:]]*The Regents/,/SUCH DAMAGE/p' fortune/fortune.c |
sed -e 's/^ [*][[:space:]]\?//' >LICENSE
}
do_install() {
make prefix=${DESTDIR} FORTDIR=${DESTDIR}/usr/bin \
COOKIEDIR=$DESTDIR/usr/share/fortunes \
install
vlicense LICENSE
}