summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d84f2862c6520b11119861aca517f9a91981a0a6 (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: Cooper Pierce <cppierce at andrew.cmu.edu>
pkgname='smackage-git'
pkgver=1.4.3.r298
pkgrel=1
pkgdesc="Package Manager for Standard ML"
arch=('x86_64')
url="https://github.com/standardml/smackage"
license=('BSD')
depends=('gmp')
makedepends=('git'
             'mlton')
provides=("${pkgname%-git}")
source=('smackage::git+http://github.com/standardml/smackage.git#branch=master')
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
    printf "%s" "$(git tag | tail -n1 | cut -c2-).r$(git rev-list --count HEAD)"
}

prepare() {
	cd "$srcdir/${pkgname%-git}"
}

build() {
	cd "$srcdir/${pkgname%-git}"
	make mlton
}

check() {
	cd "$srcdir/${pkgname%-git}"
    [ -e bin/smackage ]
}

package() {
	cd "$srcdir/${pkgname%-git}"
    # Install BSD 2-clause license 
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	DESTDIR="$pkgdir/usr/" make install
}