summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 948263111a842aeba51bb078837267d51d6eaa20 (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
# Maintainer: Leon Möller <jkhsjdhjs at totally dot rip>
pkgname=p4lang-bmv2
pkgver=1.15.0
pkgrel=1
pkgdesc="P4 reference software switch"
arch=('any')
url="https://github.com/p4lang/behavioral-model"
license=('Apache')
depends=(
    'boost-libs'
    'gmp'
    'libevent'
    'libpcap'
    'nanomsg'
    'python'
    'python-thrift'
    'thrift'
)
makedepends=('boost')
source=("$pkgname-$pkgver::$url/archive/refs/tags/$pkgver.tar.gz"
        "$pkgname-fix-ipaddr-import.patch::https://github.com/p4lang/behavioral-model/commit/7a8843ffb87bab9eb0a44c993ae39a9fefca10cf.patch")
sha512sums=('b92f761338a8f60cfc3578d62848f2201b4f1d55a562680a0a9fe9e63cb764eb00f252f59b48020871fa65fe3d0468fab888affa5cfef00a7578d940dd7fc08b'
            '9102f8a0d98fd9a7b2693f2b71f0677c33cbdf4260e031012febcb6cb8a2a645b3a6a1d274974067854100903b9ebb5bca8a1eef1bc01e99120df2969c764b3f')

prepare() {
    cd "behavioral-model-$pkgver"
    patch -Np1 -i "../$pkgname-fix-ipaddr-import.patch"
}

build() {
    cd "behavioral-model-$pkgver"
    ./autogen.sh
    ./configure --prefix=/usr
    make
}

check() {
    cd "behavioral-model-$pkgver"
    #TODO: tests fail
    make -k check || true
}

package() {
    cd "behavioral-model-$pkgver"
    make DESTDIR="$pkgdir/" install
}