void-packages/srcpkgs/factor/template
B. Wilson 27b9f86609
New package: factor-0.97
Closes: #262 [via git-merge-pr]
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2018-09-02 16:50:39 +02:00

49 lines
1.2 KiB
Bash

# Template file for 'factor'
pkgname=factor
version=0.97
revision=1
only_for_archs="i686 x86_64 x86_64-musl"
build_style=gnu-makefile
hostmakedepends="unzip pkg-config"
makedepends="gtkglext-devel"
nostrip_files="a.elf"
short_desc="Concatenative programming language, similar to Forth"
maintainer="B. Wilson <x@wilsonb.com>"
license="BSD-2-Clause"
homepage="http://factorcode.org/"
distfiles="http://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip"
checksum=fd75e765590691c89b866e5265ae16bfb36d0e28eed095702ae1e206114663b8
post_extract() {
mv "${XBPS_BUILDDIR}/factor" "${wrksrc}"
}
post_build() {
image=''
case "${XBPS_TARGET_MACHINE}" in
i686*) image='boot.unix-x86.32.image';;
x86_64*) image='boot.unix-x86.64.image';;
*) return 1;;
esac
touch /etc/ld.so.cache
./factor -i="${image}"
}
do_install() {
vmkdir "usr/lib/${pkgname}"
vcopy misc "usr/lib/${pkgname}"
vcopy extra "usr/lib/${pkgname}"
vcopy core "usr/lib/${pkgname}"
vcopy basis "usr/lib/${pkgname}"
vinstall factor 755 "usr/lib/${pkgname}"
vinstall factor.image 644 "usr/lib/${pkgname}"
vmkdir usr/bin
ln -sr "${DESTDIR}/usr/lib/${pkgname}/factor" \
"${DESTDIR}/usr/bin/factor-vm"
vlicense license.txt
}