Advertisement
Guest User

IBM Cplex AUR PKGBUILD

a guest
Sep 28th, 2018
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.41 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.  
  24. source=("file://${_installer}" installer.properties.template)
  25.  
  26. prepare() {
  27.     chmod +x "${_installer}"
  28.  
  29.     cd "${srcdir}"
  30.  
  31.     # Installer can only work with absolute paths.
  32.     sed "s,ROOT,${pkgdir}/opt/ibm/ILOG/CPLEX," installer.properties.template > installer.properties
  33. }
  34.  
  35. package() {
  36.     # Extract source by running the installer.
  37.     "./${_installer}" -f "${srcdir}/installer.properties"
  38.  
  39.     # Fix /opt permissions to avoid a warning (leave everything else as-is)
  40.     chmod 755 "$pkgdir/opt"
  41.  
  42.     # Remove uninstaller files and logs (avoid build directory warning)
  43.     rm -Rf "$pkgdir/opt/ibm/ILOG/CPLEX/Uninstall"
  44. }
  45.  
  46. md5sums=('1cb4b29131433491a95efd73b145b821'
  47.          'f295f6c4ecd0f3a6d2fdca21788efd0f')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement