void-packages/srcpkgs/sam/template
2016-05-23 15:31:04 +02:00

42 lines
1.2 KiB
Bash

# Template file for 'sam'
pkgname=sam
version=20160520
revision=1
_githash=4376931065dc54bed8eb859bd7111660bf3d4923
wrksrc="${pkgname}-${_githash}"
disable_parallel_build=yes
makedepends="libXft-devel libXt-devel"
short_desc="Screen editor with structural regular expressions"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="MIT-like"
homepage="http://www.deadpixi.com/an-updated-version-of-sam"
distfiles="https://github.com/deadpixi/${pkgname}/archive/${_githash}.tar.gz"
checksum=417327e01e564b69a76773646239556773e13061f1a9d7b23ad1a0530402ce2e
post_extract() {
sed -i '/-o sam/s/$/ $(LDFLAGS)/' sam/Makefile
sed -i '/-o samterm/s/$/ $(LDFLAGS)/' samterm/Makefile
sed -i '1iall:' doc/Makefile
}
do_build() {
case "$XBPS_TARGET_MACHINE" in
i686*|armv*) USE64BITS=0;;
x86_64*|aarch64*) USE64BITS=1;;
*) msg_error "Unknown word length for $XBPS_TARGET_MACHINE";;
esac
make ${makejobs} CC="${CC} ${CFLAGS}" DESTDIR=/usr LDFLAGS="$LDFLAGS" \
FREETYPEINC=${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 README
vdoc doc/se.ps
vdoc doc/sam.tut.ms
}