-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
39 lines (36 loc) · 1.25 KB
/
template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Template file for 'fortune-mod'
pkgname=fortune-mod
version=1.99.1
revision=7
hostmakedepends="recode"
makedepends="recode-devel"
short_desc="Implementation of the BSDGames 'fortune' program"
maintainer="Orphaned <orphan@voidlinux.org>"
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
desc_option_offensive="Enable offensive fortunes"
build_options="offensive"
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 OFFENSIVE=$(vopt_if offensive 1 0) \
install
vlicense LICENSE
}