summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 597079fac8304d569e3c096e68a82520816b093b (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
# Maintainer: Jonathan Tremesaygues <killruana@slaanesh.org>

pkgname=graywolf-git
pkgver=0.1.6.r185.f47937b
pkgrel=2
epoch=
pkgdesc='An opensource placement tool'
arch=('i686' 'x86_64')
url='https://github.com/rubund/graywolf/'
license=('GPL-2.0-or-later')
provides=('graywolf')
conflicts=('graywolf')
depends=('bash' 'glibc' 'gsl' 'libx11')
makedepends=('cmake' 'git')
source=("git+https://github.com/rubund/graywolf")
sha512sums=('SKIP')

pkgver() {
    cd "$srcdir/${pkgname%-git}"
    printf "0.1.6.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "${srcdir}/${pkgname%-git}"
    # Define C_FLAGS and CXX_FLAGS for ignoring a problem with global
    # variables
    # See https://github.com/rubund/graywolf/issues/43
    cmake -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_C_FLAGS="-fcommon" \
        -DCMAKE_CXX_FLAGS="-fcommon" \
        -B build
    cmake --build build
}

package() {
    cd "${srcdir}/${pkgname%-git}"
    DESTDIR="${pkgdir}" cmake --install build
    ln -s flow.noroute "${pkgdir}"/usr/lib/graywolf/bin/flow/flow
}