summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c0f80bdd73fbade113aea58009141cc2dd4eb5d0 (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
50
51
# Maintainer: Andrea Zanoni <andrea dot zanoni at polimi dot it>
pkgname=mbdyn-git
pkgver=r8465.53a8e2a5a
pkgver() {
	cd "$pkgname"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
pkgrel=1
pkgdesc="The first *free* general purpose Multibody Dynamics analysis software"
arch=('any')
url='www.mbdyn.org'
license=('GPLv2')
depends=(openblas-lapack suitesparse netcdf netcdf-cxx)
makedepends=(git autoconf automake gcc-fortran libtool)
optdepends=('ginac: symbolic elements support')
source=("${pkgname}::git+https://public.gitlab.polimi.it/DAER/mbdyn.git#branch=develop")
sha256sums=('SKIP')

# Note: edit the list of modules to suit your needs
_modules="hfelem"

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

prepare() {
	cd ${srcdir}/${pkgname}
	sh bootstrap.sh
	CXXFLAGS="-O3 -march=native" \
		FCFLAGS="-O3" \
		CFLAGS="-O3 -march=native" \
		./configure \
		--with-module="${_modules}" \
		--prefix=/usr \
		--with-y12=no \
		--with-lapack=yes \
		--enable-python \
		--enable-Werror=no \
		--with-superlu=no
}

build() {
	cd ${srcdir}/${pkgname}
	make -j$(nproc)
}

package() {
	cd ${srcdir}/${pkgname}
	make install
}