summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9fd0b4aeb7e07c3815d24e4526cca4b6ea7e83b3 (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
57
58
59
60
61
62
63
# Maintainer: Stephen Martin <stephenSRMMartin at gmail dot com>
pkgname=jasp-desktop-git
_pkgname=jasp-desktop
_buildname=jasp-build
pkgver=v0.8.1.2.r0.g7401fa07
pkgrel=1
pkgdesc="JASP, a low fat alternative to SPSS, a delicious alternative to R."
arch=('any')
url="http://jasp-stats.org"
license=('AGPL3')
depends=('qt5-base' 'r' 'libarchive' 'qt5-webkit' 'qt5-declarative' 'qt5-sensors' 'qt5-svg' 'tk' 'curl' 'jasp-rbundle')
makedepends=('git' 'r' 'gcc-fortran' 'boost' 'jasp-rbundle')
provides=('jasp' 'jasp-desktop')
conflicts=('jasp' 'jasp-desktop')
options=('!strip')
source=("$_pkgname::git+https://github.com/jasp-stats/$_pkgname.git#tag=v0.8.1.2" 
	"include.patch")

pkgver() {
  cd "$srcdir/$_pkgname"
  ( set -o pipefail
  git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

prepare() {
  cd $srcdir/$_pkgname
  #Patch the R include path
  patch -p1 < $srcdir/include.patch
  #Create separate build dir
  mkdir -p $srcdir/$_buildname
  cd $srcdir/$_buildname
  
  echo "Creating Makefile"
  qmake PREFIX=/usr ../$_pkgname
}

build() {
  cd $srcdir/$_buildname
  make 
}

package() {
  #Install files
  cd $srcdir/$_buildname
  mkdir -p $pkgdir/usr/lib/JASP
  
  cp -r ./R ./jasp ./JASPEngine ./Resources $pkgdir/usr/lib/JASP

  #Install icon
  cp $srcdir/$_pkgname/Tools/debian/jasp.svg $pkgdir/usr/lib/JASP/Resources/

  #Install .desktop file
  mkdir -p $pkgdir/usr/share/applications
  cp $srcdir/$_pkgname/Tools/debian/jasp.desktop $pkgdir/usr/share/applications

  #Install link to binary
  mkdir -p $pkgdir/usr/bin/
  ln -s /usr/lib/JASP/jasp $pkgdir/usr/bin/JASP
}
md5sums=('SKIP'
         'a703cd01dddd301d89425b47cb2a0c61')