Want more features on Pastebin? Sign Up, it's FREE!
Guest

AUR: ziboptsuite-2.1.0-3 PKGBUILD

By: a guest on Dec 22nd, 2011  |  syntax: Bash  |  size: 3.59 KB  |  views: 25  |  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:  Johannes Schlatow <johannes.schlatow@googlemail.com>
  2. # Contributor: Stephan Friedrichs <deduktionstheorem@googlemail.com>
  3.  
  4. pkgname=ziboptsuite
  5. pkgver=2.1.0
  6. pkgrel=3
  7. pkgdesc='The ZIB Optimization Suite is a tool for generating and solving mixed integer programs. Consists of ZIMPL, SoPlex and SCIP.'
  8. arch=('i686' 'x86_64')
  9. url='http://zibopt.zib.de/'
  10. license=('LGPL3' 'custom:ZIB Academic License')
  11. depends=('zlib' 'gmp' 'readline')
  12. makedepends=('chrpath' 'doxygen' 'graphviz')
  13. provides=('scip=2.1.0' 'soplex=1.6.0' 'zimpl=3.2.0')
  14. source=("http://zibopt.zib.de/download/${pkgname}-${pkgver}.tgz")
  15. sha256sums=('af8282d8cfca2860225c6b8d64da061ef942bd5a9e9f58b09505e6dcb462cafd')
  16.  
  17. build() {
  18.         # Extract directory names from the $provides array
  19.         local _scip=`echo ${provides[0]} | sed -e 's/=/-/'`
  20.         local _soplex=`echo ${provides[1]} | sed -e 's/=/-/'`
  21.         local _zimpl=`echo ${provides[2]} | sed -e 's/=/-/'`
  22.  
  23.         cd ${srcdir}/${pkgname}-${pkgver}
  24.         make
  25.  
  26.         # A local RPATH is set, get rid of it.
  27.         chrpath --delete ${_scip}/bin/scip
  28.         chrpath --delete ${_soplex}/bin/soplex
  29.  
  30.         cd ${srcdir}/${pkgname}-${pkgver}/${_scip}
  31.         make doc
  32.  
  33.         cd ${srcdir}/${pkgname}-${pkgver}/${_soplex}
  34.         make doc
  35. }
  36.  
  37. check() {
  38.         cd ${srcdir}/${pkgname}-${pkgver}
  39.         make test
  40. }
  41.  
  42. package() {
  43.         # Extract directory names from the $provides array
  44.         local _scip=`echo ${provides[0]} | sed -e 's/=/-/'`
  45.         local _soplex=`echo ${provides[1]} | sed -e 's/=/-/'`
  46.         local _zimpl=`echo ${provides[2]} | sed -e 's/=/-/'`
  47.  
  48.         # Note that, at least in ziboptsuite-2.1.0, the install targets of the
  49.         # scip/soplex/zimpl projects are utterly broken; manually copying
  50.         # everything where it belongs is absolutely necessary.
  51.         # @FIXME: Maybe make install will just work in future releases...
  52.  
  53.         cd ${srcdir}/${pkgname}-${pkgver}
  54.  
  55.         # Some files have permission 640
  56.         # @FIXME: Future versions might not require this line
  57.         chmod -R a+r .
  58.  
  59.         #
  60.         # Binaries
  61.         #
  62.         install -D -m755 ${_scip}/bin/scip ${pkgdir}/usr/bin/scip
  63.         install -D -m755 ${_soplex}/bin/soplex ${pkgdir}/usr/bin/soplex
  64.         install -D -m755 ${_zimpl}/bin/zimpl ${pkgdir}/usr/bin/zimpl
  65.  
  66.         #
  67.         # Includes
  68.         #
  69.         for dir in blockmemshell dijkstra nlpi objscip scip tclique xml; do
  70.                 mkdir -p ${pkgdir}/usr/include/scip/${dir}
  71.                 cp ${_scip}/src/${dir}/*.h $pkgdir/usr/include/scip/${dir}
  72.         done
  73.  
  74.         mkdir -p ${pkgdir}/usr/include/{soplex,zimpl}
  75.         cp ${_soplex}/src/*.h ${pkgdir}/usr/include/soplex
  76.         cp ${_zimpl}/src/*.h ${pkgdir}/usr/include/zimpl
  77.  
  78.         #
  79.         # Libraries
  80.         #
  81.         mkdir -p ${pkgdir}/usr/lib
  82.         cp -d ${_scip}/lib/liblpispx* ${pkgdir}/usr/lib
  83.         cp -d ${_scip}/lib/libnlpi* ${pkgdir}/usr/lib
  84.         cp -d ${_scip}/lib/libobjscip* ${pkgdir}/usr/lib
  85.         cp -d ${_scip}/lib/libscip* ${pkgdir}/usr/lib
  86.         cp -d ${_soplex}/lib/* ${pkgdir}/usr/lib
  87.         cp -d ${_zimpl}/lib/* ${pkgdir}/usr/lib
  88.  
  89.         # Repair "missing links" =)
  90.         # @FIXME: I hope this is not necessary in future versions!
  91.         cd ${pkgdir}/usr/lib
  92.         ln -s -T libzimpl-* libzimpl.a
  93.         cd ${srcdir}/${pkgname}-${pkgver}
  94.  
  95.         #
  96.         # Documentation
  97.         #
  98.         mkdir -p ${pkgdir}/usr/share/doc/ziboptsuite/{scip,soplex,zimpl}
  99.         install -m644 COPYING ${pkgdir}/usr/share/doc/ziboptsuite/
  100.         cp -r ${_scip}/{CHANGELOG,COPYING,release-notes,doc/html} ${pkgdir}/usr/share/doc/ziboptsuite/scip/
  101.         cp -r ${_soplex}/{CHANGELOG,COPYING,doc/html} ${pkgdir}/usr/share/doc/ziboptsuite/soplex/
  102.         install -m644 ${_soplex}/src/simpleexample.cpp ${pkgdir}/usr/share/doc/ziboptsuite/soplex/
  103.         cp -r ${_zimpl}/{CHANGELOG,LICENSE,README,doc,example} ${pkgdir}/usr/share/doc/ziboptsuite/zimpl/
  104.  
  105.         #
  106.         # License
  107.         #
  108.         install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  109. }
clone this paste RAW Paste Data