summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cb94e58b1cba383e2031850cb862c580d6955099 (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
52
53
54
55
56
# Maintainer: Dario Bosch <LastnameFirstname at gmail dot com>

pkgname=mrtrix3
pkgver=r6677.fce21191
pkgrel=1
pkgdesc="tools for diffusion MRI analyses, data conversion and a viewer (mrview)"
arch=('x86_64')
url="https://github.com/MRtrix3/${pkgname}"
license=('MPL2')

depends=(
         # 'zlib' # already installed as dependency of python
         # 'qt5-base' # already installed as dependency of qt5-svg
         'qt5-svg'
         'python'
        )

optdepends=(
            'libtiff'
            'fftw'
           )

makedepends=(
          'gcc'
          'git'
          'eigen'
)

provides=('mrtrix3')
conflicts=('mrtrix3')

source=("${pkgname}-git::git+https://github.com/MRtrix3/${pkgname}#commit=$(cut -d'.' -f2 <<< ${pkgver})")
sha256sums=('SKIP')

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

build() {
	# Set CPU architecture to the building system's architecture
	export ARCH=native
	cd "${pkgname}-git"
	./configure
	./build
}

package() {
  	cd "${pkgname}-git"
	mkdir -p "$pkgdir/usr/bin"
	mkdir -p "$pkgdir/usr/lib"
  	cp -R ./bin/* "$pkgdir/usr/bin"
	cp -R ./lib/* "$pkgdir/usr/lib"
	chmod -R 755 "$pkgdir/usr/bin"
	chmod -R 755 "$pkgdir/usr/lib"
}