summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 815cbfb3aeb09141e6e99a576af7644c2a35ef0b (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
# Maintainer: xpt <user.xpt@gmail.com>

pkgname=liggghts-lpp #t1
pkgver=20170223.093837
pkgrel=2
pkgdesc="Open Source Discrete Element Method Particle Simulation Software - Post Processing (Pizza.py)"
arch=('any')
url="https://github.com/CFDEMproject/LPP"
license=('GPL')
depends=('liggghts' 'python2-numpy') 
_gitroot="https://github.com/CFDEMproject/LPP.git"
_gitname="LPP"


build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot $_gitname
  fi

  msg "GIT checkout done or server timeout"
}
 package() {
  mkdir -p $pkgdir/usr/share/liggghts/lpp/{src,scripts}
  mkdir -p $pkgdir/usr/bin/
  mkdir -p $pkgdir/usr/share/doc/liggghts/lpp/
  mkdir -p $pkgdir/usr/share/liggghts/examples-lpp/files
  cd $srcdir/$_gitname
  
  install -Dm 755 src/* $pkgdir/usr/share/liggghts/lpp/src
  install -Dm 755 scripts/* $pkgdir/usr/share/liggghts/lpp/scripts
   install -Dm644 doc/* $pkgdir/usr/share/doc/liggghts/lpp/
   install -Dm644 examples/{*.py,README} $pkgdir/usr/share/liggghts/examples-lpp/
   install -Dm644 examples/files/* $pkgdir/usr/share/liggghts/examples-lpp/files
   install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/liggghts/lpp/LICENSE"
   install -Dm644 "README" "$pkgdir/usr/share/licenses/liggghts/lpp/README"
  echo -e '#! /bin/bash\npython2 /usr/share/liggghts/lpp/src/lpp.py $@' >  $pkgdir/usr/bin/lpp
  chmod +x $pkgdir/usr/bin/lpp
  echo -e '#! /bin/bash\npython2 /usr/share/liggghts/lpp/src/pizza.py $@' >  $pkgdir/usr/bin/pizza
  chmod +x $pkgdir/usr/bin/pizza
}