updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / raxml-standard-git / PKGBUILD
blobd4f97461dcb63f4ed3ee6792ea9db85990061a2a
1 # Contributor: Stunts <f.pinamartins@gmail.com> 
2 pkgname=raxml-standard-git
3 pkgver=20111008
4 pkgrel=2
5 pkgdesc="Randomized Axelerated Maximum Likelihood - standard version from git"
6 arch=(i686 x86_64)
7 url="https://github.com/stamatak/standard-RAxML"
8 license=('GPL2')
10 depends=()
11 optdepends=('openmpi: for buildin MPI capable binary')
12 makedepends=('git' 'make')
13 conflicts=('raxml' 'raxml-mpi')
14 source=()
16 #Check whether the CPU supports SSE3 instruction set:
17 if grep -q pni /proc/cpuinfo
18 then
19     makefile=Makefile.SSE3
20     extension=-SSE3
21 else
22     makefile=Makefile
23     extension=''
26 _gitroot=git://github.com/stamatak/standard-RAxML.git
27 _gitname=standard-RAxML
28 _builddir=$srcdir/$_gitname-build
30 build() {
31   cd $srcdir/
32   msg "Connecting to github.com GIT server...."
33   if [ -d $srcdir/$_gitname ] ; then
34     pushd $_gitname && git pull origin && popd
35     msg "The local files are updated."
36   else
37     git clone $_gitroot
38   fi
39   msg "GIT checkout done or server timeout"
40   msg "Starting make..."
41   rm -rf $_gitname-build
42   
43   git clone $_gitname $_gitname-build
44   cd $_builddir
45   
46   #Build simple binary
47   make -f $makefile.gcc
48   rm *.o
50   #Build MPI binary (if OpenMPI is available)
51   if [ pacman -Q openmpi |grep -v error]
52   then
53       make -f $makefile.MPI.gcc
54       rm *.o
55       mpi=1
56   else
57       mpi=0
58   fi
60   #Build Pthreads binary
61   make -f $makefile.PTHREADS.gcc
62   rm *.o
65 package() {
66   install -d $startdir/pkg/usr/bin 
67   cp $_builddir/raxmlHPC$extension $startdir/pkg/usr/bin/raxml
68   cp $_builddir/raxmlHPC-PTHREADS$extension $startdir/pkg/usr/bin/raxml-PTHREADS
69   if [ $mpi ]
70   then
71       cp $_builddir/raxmlHPC-MPI$extension $startdir/pkg/usr/bin/raxml-MPI
72   fi