summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f1d05c75049a6b5474877330bf0cb39c26565907 (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
# Maintainer: Kuan-Yen Chou <kuanyenchou@gmail.com>

pkgname=spin-git
pkgver=6.5.2.r23.g6651f97
pkgrel=1
pkgdesc='Explicit state logic model checking tool'
depends=('glibc')
optdepends=('tcl: ispin graphical interface'
            'swarm: improved performance on large verification problems'
            'modex: extract verification models from implementation C code'
            'ispin: GUI for Spin')
arch=('i686' 'x86_64')
url='https://spinroot.com/'
license=('custom:BSD3')
provides=('spin')
conflicts=('spin')
source=("$pkgname"::'git+https://github.com/nimble-code/Spin')
sha512sums=('SKIP')

pkgver() {
    cd "$srcdir/$pkgname"
    if git describe --long --tags >/dev/null 2>&1; then
        git describe --long --tags | sed 's/^version-//;s/\([^-]*-g\)/r\1/;s/-/./g'
    else
        printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git describe --always)"
    fi
}

build() {
    cd "$srcdir/$pkgname"
    make -C Src
    gzip -9c Man/spin.1 > Man/spin.1.gz
}

package() {
    cd "$srcdir/$pkgname"
    install -Dm 755 Src/spin "${pkgdir}/usr/bin/spin"
    install -Dm 644 Src/LICENSE "${pkgdir}/usr/share/licenses/spin/LICENSE"
    install -Dm 644 Man/spin.1.gz "${pkgdir}/usr/share/man/man1/spin.1.gz"
    install -d "${pkgdir}/usr/share/doc/spin/examples"
    find Examples/ -type f -exec chmod 644 {} +
    cp -a Examples/* "${pkgdir}/usr/share/doc/spin/examples/"
}