Advertisement
anntzer

PKGBUILD for cellprofiler-git

Oct 25th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.69 KB | None | 0 0
  1. # Maintainer: Michael Schubert <mschu.dev at gmail>
  2.  
  3. pkgname=cellprofiler-git
  4. pkgver=10914.7a59aaf
  5. pkgrel=1
  6. pkgdesc="Analysis software for cellular images"
  7. arch=('i686' 'x86_64')
  8. url="http://www.cellprofiler.org/"
  9. license=('GPL')
  10. depends=('python2-libtiff-svn' 'python2-numpy' 'python2-scipy' 'wxpython' 'python2-decorator' 'mysql-python' 'python2-matplotlib' 'cython2' 'python2-imaging')
  11. makedepends=('git' 'python2-pytz' 'python2-nose' 'python2-h5py')
  12. optdepends=('ilastik' 'python2-nuageux' 'python2-pytz' 'python2-nose' 'python2-h5py')
  13. provides=('cellprofiler')
  14. conflicts=('cellprofiler')
  15. source=($pkgname::git+https://github.com/CellProfiler/CellProfiler.git
  16.         cellprofiler.sh
  17.         cp.patch)
  18. md5sums=('SKIP'
  19.          '47ec4b5ab623e48b9feb802ce3d2f6d1'
  20.          '681e79e4a11579a1c937b910fcf9a665')
  21.  
  22. pkgver() {
  23.   cd "$srcdir/$pkgname"
  24.   echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
  25. }
  26.  
  27. prepare() {
  28.   cd "$srcdir/$pkgname"
  29.   patch -p0 --strip 1 < ../cp.patch
  30.   if [ $CARCH == 'i686' ]; then
  31.     sed -i "s/'amd64'/'i386'/" cellprofiler/utilities/setup.py
  32.   fi
  33. }
  34.  
  35. build() {
  36.   cd "$srcdir/$pkgname"
  37.  
  38.   cython2 cellprofiler/utilities/javabridge.pyx
  39.   python2 setup.py build
  40.   python2 CellProfiler.py --build-and-exit
  41. }
  42.  
  43. package() {
  44.   pydir=`python2 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`
  45.   mkdir -p "$pkgdir/$pydir"
  46.   cp -r "$srcdir/$pkgname" "$pkgdir/$pydir/cellprofiler"
  47.  
  48.   install -Dm755 "$srcdir/cellprofiler.sh" "$pkgdir/usr/bin/cellprofiler"
  49.  
  50.   cd "$pkgdir/$pydir/cellprofiler"
  51.   rm -rf `find "$pkgdir" -name "tests" -type d` windows_setup.py
  52.   python2 -m compileall -x tutorial "$pkgdir/$pydir/cellprofiler/"
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement