void-packages/srcpkgs/sam/template
2019-07-24 10:18:53 +02:00

41 lines
1.2 KiB
Bash

# Template file for 'sam'
pkgname=sam
version=20190427
revision=1
_githash=5893679bbbab2f50ceb6ef0805e4bb63f5f51df8
wrksrc="${pkgname}-${_githash}"
makedepends="libXft-devel libXi-devel libXt-devel"
short_desc="Screen editor with structural regular expressions"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="MIT-like"
homepage="http://www.deadpixi.com/an-updated-version-of-sam"
distfiles="https://github.com/deadpixi/${pkgname}/archive/${_githash}.tar.gz"
checksum=d7b935c0bf91bf9678dedefdb0bca3d159fd518cd255fa55c4e61936201f0741
disable_parallel_build=yes
CFLAGS="-std=c99"
post_extract() {
sed -i 's/ -sf / -sfr /' doc/Makefile
sed -i '/Straddc/s/int/wchar_t/g' sam/sam.h
}
do_build() {
case "$XBPS_TARGET_MACHINE" in
i686*|armv*) USE64BITS=0;;
x86_64*|aarch64*|ppc64*) USE64BITS=1;;
*) msg_error "Unknown word length for $XBPS_TARGET_MACHINE";;
esac
make ${makejobs} CC="${CC} ${CFLAGS}" DESTDIR=/usr LDFLAGS="$LDFLAGS" \
INCLUDES=-I${XBPS_CROSS_BASE}/usr/include/freetype2 \
RXSAMNAME=rsam TERMNAME=/usr/bin/samterm USE64BITS=${USE64BITS}
}
do_install() {
vmkdir usr/bin
vmkdir usr/share/man/man1
make install DESTDIR=${DESTDIR}/usr
vlicense LICENSE
vdoc doc/se.ps
vdoc doc/sam.tut.ms
}