This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!

scotch PKGBUILD

By: rememberthemer on May 16th, 2012  |  syntax: Bash  |  size: 1.96 KB  |  views: 32  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: L.Bryce Whitson Jr. <LWhitson2@gmail.com>
  2. pkgname=scotch
  3. pkgver=5.1.12b
  4. _pkgver=5.1.12
  5. pkgrel=3
  6. pkgdesc="a software package and libraries for graph, mesh and hypergraph partitioning, static mapping, and sparse matrix block ordering"
  7. url="http://www.labri.fr/perso/pelegrin/scotch/"
  8. license="custom: CeCILL-C free/libre software license"
  9. depends=('zlib')
  10. arch=('i686' 'x86_64')
  11. source=("http://gforge.inria.fr/frs/download.php/28977/${pkgname}_${pkgver}.tar.gz")
  12. md5sums=('5d912599c2521b1ecbcd8d12b68eef9c')
  13.  
  14. build()
  15. {
  16.     cd "${pkgname}_${_pkgver}/src"
  17.  
  18.     # compile both static
  19.     if [ $CARCH == "x86_64" ]; then
  20.         sed "s/-lz -lm -lrt/-lz -lm -lrt -lpthread/" \
  21.             Make.inc/Makefile.inc.x86-64_pc_linux2 > Makefile.inc
  22.         make
  23.         sed -e "s/-lz -lm -lrt/-lz -lm -lrt -lpthread/" \
  24.             -e "s/^CFLAGS[[:space:]]*=[[:space:]]*.*/& -DIDXSIZE64/" \
  25.             Make.inc/Makefile.inc.i686_pc_linux2.shlib > Makefile.inc
  26.         make
  27.     else
  28.         sed "s/-lz -lm -lrt/-lz -lm -lrt -lpthread/" Make.inc/Makefile.inc.i686_pc_linux2 > Makefile.inc
  29.         make
  30.         sed "s/-lz -lm -lrt/-lz -lm -lrt -lpthread/" Make.inc/Makefile.inc.i686_pc_linux2.shlib > Makefile.inc
  31.         make
  32.     fi
  33. }
  34.  
  35. package()
  36. {
  37.     cd "${pkgname}_${_pkgver}"
  38.     mkdir -p "${pkgdir}"/usr/{include,share/doc}
  39.    
  40.     local _prog _mp
  41.  
  42.     for _prog in bin/*; do
  43.         install -Dm755 ${_prog} "${pkgdir}"/usr/bin/scotch_${_prog#*/}
  44.     done
  45.  
  46.     #mapage install, creating symlinks for renamed binaries
  47.     for _mp in man/man1/* ; do
  48.         install -Dm644 $_mp "${pkgdir}"/usr/share/man/man1/${_mp##*/}
  49.         ln -s ${_mp##*/}.gz "${pkgdir}"/usr/share/man/man1/scotch_${_mp##*/}.gz
  50.     done
  51.  
  52.     cp -r lib "${pkgdir}"/usr
  53.     cp -r include "${pkgdir}"/usr/include/${pkgname}
  54.    
  55.     cp -r doc "${pkgdir}"/usr/share/doc/${pkgname}
  56.     install -Dm644 doc/CeCILL-C_V1-en.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
  57. }
clone this paste RAW Paste Data