python-texttable: update to 1.3.1
[void-packages.git] / srcpkgs / bmake / template
blobd3594e1d70d595a1a94004939ecc6e6aa9b27882
1 # Template file for 'bmake'
2 pkgname=bmake
3 version=20180512
4 revision=1
5 create_wrksrc=yes
6 short_desc="Portable version of the NetBSD make build tool"
7 maintainer="Juan RP <xtraeme@voidlinux.eu>"
8 license="BSD-3-Clause"
9 homepage="http://www.crufty.net/help/sjg/bmake.html"
10 distfiles="http://www.crufty.net/ftp/pub/sjg/bmake-${version}.tar.gz"
11 checksum=ac3cd262065fcc20c1dec7c95f06306c8138b3e17025b949343a06a8980a5508
13 do_configure() {
14         cd bmake
15         sed -i 's/op_test() {/& return 0;/' boot-strap
16         sed -i '1s,:,#!/bin/sh,g' install-sh
17         if [ "$CROSS_BUILD" ]; then
18                 mkdir -p bmake-host
19                 cd bmake-host
20                 # Build a native bmake for installation
21                 unset CC LD AR CFLAGS LDFLAGS
22                 ../boot-strap op=build
23                 cp linux*-*/bmake .
24         fi
27 do_build() {
28         mkdir -p bmake/bmake-build
29         cd bmake/bmake-build
30         if [ "$CROSS_BUILD" ]; then
31                 _args="--host=${XBPS_CROSS_TRIPLET}"
32         fi
33         ../boot-strap ${_args} --prefix=/usr op=build
36 do_install() {
37         cd bmake/bmake-build
38         if [ "$CROSS_BUILD" ]; then
39                 sed -i "s,^BMAKE=$,BMAKE=${wrksrc}/bmake/bmake-host/bmake," ../boot-strap
40         fi
41         ../boot-strap --prefix=/usr --install-destdir=${DESTDIR} op=install
42         rm -rf ${DESTDIR}/usr/share/man/cat1
43         vman ../bmake.1
45         sed -n '/#/q;p' ../make.c >LICENSE
46         vlicense LICENSE