summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0c633402e236f32f2d60e4f13a8e1554ae9bdf51 (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
# 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
}

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