summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bd0b81a1e1aac939a94f2153e558a728f9d394d6 (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
41
42
43
44
45
46
47
48
49
pkgname=ocaml-ocplib-simplex-git
pkgver=r38.g5bee435
pkgrel=1

pkgdesc='simplex algorithm implementation for solving systems of linear inequalities and optimizing linear objective functions'
url='https://github.com/OCamlPro-Iguernlala/ocplib-simplex'
arch=('i686' 'x86_64')
license=('LGPL')

depends=('ocaml')
makedepends=('ocaml-findlib' 'git')

provides=('ocaml-ocplib-simplex')
conflicts=('ocaml-ocplib-simplex')

source=('git+https://github.com/OCamlPro-Iguernlala/ocplib-simplex'
        'fix-makefile-install-target.diff')

sha256sums=('SKIP'
            '273455a20fd9a291956904fe48734d2e602ab07211d6833968f5ca0ecc271a31')

prepare() {
    cd ocplib-simplex
    # https://github.com/OCamlPro-Iguernlala/ocplib-simplex/issues/6
    patch -Np1 -i "$srcdir"/fix-makefile-install-target.diff
}

pkgver() {
    cd ocplib-simplex
    printf 'r%s.g%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd ocplib-simplex
    autoreconf -fi
    ./configure --prefix=/usr
    make
}

check() {
    cd ocplib-simplex
    # XXX tests require opam
    # make tests
}

package() {
    cd ocplib-simplex
    make DESTDIR="$pkgdir" install
}