summaryrefslogtreecommitdiff
path: root/community/bmake/PKGBUILD
blob: 27475c9c45c372b54fb663def25363c2173467ce (plain)
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
# Maintainer: Alex Szczuczko <alex at szc dot ca>
# Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us>
# Contributor: Imanol Celaya <ilcra1989@gmail.com>

pkgname=bmake
pkgver=20131001
pkgrel=2
pkgdesc="Portable version of the NetBSD 'make' build tool"
arch=('i686' 'x86_64')
url="http://www.crufty.net/help/sjg/bmake.html"
license=('BSD')
source=("http://www.crufty.net/ftp/pub/sjg/bmake-$pkgver.tar.gz")
sha256sums=('0a91ac60b82270c4b4f21a43e66eb51c32b4df55e01ea592e42eb323909a559b')

prepare() {
    cd "$srcdir/$pkgname"
    # Add missing bsd.*.mk symlinks
    _links_orig="dep doc init lib links man nls obj own prog subdir"
    _links_new="dep doc inc init lib links man nls obj own prog subdir"
    sed -i -e "s/$_links_orig/$_links_new/" mk/install-mk
}

build() {
    cd "$srcdir"
    mkdir -p bmake-build
    cd bmake-build
    sh ../bmake/boot-strap --prefix=/usr
}

package() {
    cd "$srcdir/bmake-build"
    # Fix directory permissions on install
    install -dm0755 "$pkgdir/usr/bin"
    install -dm0755 "$pkgdir/usr/share/man/cat1"
    install -dm0755 "$pkgdir/usr/share/licenses/$pkgname"
    sh ../bmake/boot-strap --prefix=/usr --install-destdir="$pkgdir" op=install
    head -n70 ../bmake/main.c >$pkgdir/usr/share/licenses/$pkgname/LICENSE
}