1 # Maintainer: Francois Rigaut <frigaut at gmail dot com>
6 pkgdesc="Adaptive Optics simulation tool in yorick"
9 url="http://www.maumae.net/yorick/doc/plugins.php"
10 groups=('science' 'yorick-all')
11 depends=('yorick' 'pygtk' 'yorick-imutil-git' 'fftw' 'yorick-soy-git' 'python2')
12 makedepends=('git' 'yorick' 'pkgconfig>=0.9.0')
13 provides=('yorick-yao')
14 conflicts=('yorick-yao')
15 replaces=('yorick-yao')
17 _gitroot="git://github.com/frigaut/yao.git"
22 msg "Connecting to git repo..."
23 if [ -d ${srcdir}/$_gitname ] ; then
24 cd $_gitname && git pull origin
25 msg "The local files are updated."
30 msg "GIT checkout done or server timeout"
31 msg "Starting script install..."
33 git clone $_gitname $_gitname-build
34 cd ${srcdir}/$_gitname-build
36 yorick -batch make.i || return 1
38 make DESTDIR=${pkgdir} install || return 1
39 sed -i -e "s|env python|env python2|" ${pkgdir}/usr/share/yorick/2.2/python/yao.py
40 mkdir -p ${pkgdir}/usr/bin
41 echo 's=sum(strtok(Y_VERSION,".",3)(1)+"."+strtok(Y_VERSION,".",3)(2))' > /tmp/get_yversion
42 echo 'f=open("/tmp/yversion","w"); write,f,format="%s",s; close,f;' >> /tmp/get_yversion
43 yorick -batch /tmp/get_yversion
44 yversion=`cat /tmp/yversion`
45 ln -s /usr/lib/yorick/${yversion}/bin/yao ${pkgdir}/usr/bin/yao