Advertisement
Guest User

OPLIDE PKGBUILD for AUR

a guest
Sep 28th, 2018
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.83 KB | None | 0 0
  1. # Maintainer: Maximilian Stahlberg <maximilian.stahlberg tu-berlin de>
  2. # Contributor: Alberto Santini <alberto.santini at upf dot edu>
  3.  
  4. # You need to manually download the IBM ILOG CPLEX Optimization Studio installer
  5. # and place it into the same directory as this PKGBUILD, before you proceed.
  6.  
  7. pkgname='cplex'
  8. pkgdesc="A commercial solver for mathematical optimization problems."
  9. pkgver=12.8
  10. pkgrel=2
  11. arch=('x86_64')
  12. url='https://www.ibm.com/software/products/de/ibmilogcpleoptistud'
  13. license=('custom')
  14. depends=('gcc-libs')
  15. optdepends=(
  16.     'python2: for Python2 bindings'
  17.     'python: for Python bindings'
  18. )
  19. options=('!strip')
  20.  
  21. _basename="cplex_studio${pkgver//./}.linux-${arch/_/-}"
  22. _installer="${_basename}.bin"
  23. _archdir="${arch/_/-}_linux"
  24.  
  25. source=("file://${_installer}" installer.properties.template)
  26.  
  27. prepare() {
  28.     chmod +x "${_installer}"
  29.  
  30.     cd "${srcdir}"
  31.  
  32.     # Installer can only work with absolute paths.
  33.     sed "s,ROOT,${pkgdir}/opt/ibm/ILOG/CPLEX," installer.properties.template > installer.properties
  34. }
  35.  
  36. package() {
  37.     # Extract source by running the installer.
  38.     "./${_installer}" -f "${srcdir}/installer.properties"
  39.  
  40.     # Fix /opt permissions to avoid a warning (leave everything else as-is)
  41.     chmod 755 "$pkgdir/opt"
  42.  
  43.     # Remove uninstaller files and logs (avoid build directory warning)
  44.     rm -Rf "$pkgdir/opt/ibm/ILOG/CPLEX/Uninstall"
  45.  
  46.     # Make shortcuts
  47.     mkdir -p "$pkgdir/usr/bin"
  48.     ln -s "/opt/ibm/ILOG/CPLEX/cplex/bin/${_archdir}/cplex" "${pkgdir}/usr/bin/cplex"
  49.     ln -s "/opt/ibm/ILOG/CPLEX/cplex/bin/${_archdir}/cplexamp" "${pkgdir}/usr/bin/cplexamp"
  50.     ln -s "/opt/ibm/ILOG/CPLEX/cpoptimizer/bin/${_archdir}/cpoptimizer" "${pkgdir}/usr/bin/cpoptimizer"
  51.     ln -s "/opt/ibm/ILOG/CPLEX/opl/oplide/oplide" "$pkgdir/usr/bin/oplide"
  52. }
  53.  
  54. md5sums=('1cb4b29131433491a95efd73b145b821'
  55.          'f295f6c4ecd0f3a6d2fdca21788efd0f')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement