summaryrefslogtreecommitdiff
path: root/community/bmake/PKGBUILD
blob: a0c30709c0647e020479ea7d611577cb171a421e (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
39
40
# 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=20140214
pkgrel=1
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')
sha256sums=('0f7ecadb6dcd5e4902a03137daba6fd7756f54e82942b524f3b38d7406b6d83e')
sha256sums=('2ec1771a800431c26361659ab0f96ec5c2536e85b46564eb69fa75a4b12886de')

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
}