summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b302139855ba5bbc001a976a5bb7c77a56a03468 (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
# Maintainer: acxz <akashpatel2008 at yahoo dot com>
pkgname=jsbsim-git
pkgver=r5209.b9a9ee9a
pkgrel=1
pkgdesc="An open source flight dynamics & control software library"
arch=('x86_64')
url="http://www.jsbsim.org"
license=('LGPL-2.1')
depends=(expat)
makedepends=(cmake gcc git)
_name=jsbsim
conflicts=(jsbsim)
provides=(jsbsim)
source=("git+https://github.com/JSBSim-Team/${_name}")
sha256sums=('SKIP')

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

build() {

    cd "${srcdir}/${_name}"

    msg "Starting CMake (build type: ${_buildtype})"

    # Create a build directory
    mkdir -p "${srcdir}/${_name}/build"
    cd "${srcdir}/${_name}/build"

    cmake \
        -DCMAKE_BUILD_TYPE=Release \
        -DSYSTEM_EXPAT=ON \
        -DBUILD_SHARED_LIBS=ON \
        -DCMAKE_INSTALL_PREFIX="/usr" \
        ..

    msg "Building the project"
    make
}

package() {
    cd "${srcdir}/${_name}/build"

    msg "Installing files"
    make DESTDIR="${pkgdir}/" install
}