SHARE
TWEET

cplex aur repository update

a guest Aug 10th, 2018 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. From e9921639e4bb0f55f5c4b1bd0644f127d95942a8 Mon Sep 17 00:00:00 2001
  2. From: Alberto Santini <santini.alberto@gmail.com>
  3. Date: Fri, 10 Aug 2018 23:54:51 +0200
  4. Subject: [PATCH] Updated pkgbuild
  5.  
  6. ---
  7.  .SRCINFO |  2 +-
  8.  PKGBUILD | 66 +++++++++++++++++++++++++++++++++++++++++++++-----------
  9.  2 files changed, 55 insertions(+), 13 deletions(-)
  10.  
  11. diff --git a/.SRCINFO b/.SRCINFO
  12. index e2dbfd9..42c1a8a 100644
  13. --- a/.SRCINFO
  14. +++ b/.SRCINFO
  15. @@ -3,7 +3,7 @@
  16.  pkgbase = cplex
  17.     pkgdesc = A commercial solver for mathematical optimization problems.
  18.     pkgver = 12.8
  19. -   pkgrel = 1
  20. +   pkgrel = 2
  21.     url = https://www.ibm.com/software/products/de/ibmilogcpleoptistud
  22.     arch = x86_64
  23.     license = custom
  24. diff --git a/PKGBUILD b/PKGBUILD
  25. index eff0759..8f08cca 100644
  26. --- a/PKGBUILD
  27. +++ b/PKGBUILD
  28. @@ -1,4 +1,5 @@
  29.  # Maintainer: Maximilian Stahlberg <maximilian.stahlberg tu-berlin de>
  30. +# Contributor: Alberto Santini <alberto.santini at upf dot edu>
  31.  
  32.  # You need to manually download the IBM ILOG CPLEX Optimization Studio installer
  33.  # and place it into the same directory as this PKGBUILD, before you proceed.
  34. @@ -6,11 +7,11 @@
  35.  pkgname='cplex'
  36.  pkgdesc="A commercial solver for mathematical optimization problems."
  37.  pkgver=12.8
  38. -pkgrel=1
  39. +pkgrel=2
  40.  arch=('x86_64')
  41.  url='https://www.ibm.com/software/products/de/ibmilogcpleoptistud'
  42.  license=('custom')
  43. -makedepends=('python2-setuptools' 'python-setuptools')
  44. +makedepends=('python2>=2.7', 'python>=3.5', 'python2-setuptools' 'python-setuptools')
  45.  depends=('gcc-libs')
  46.  optdepends=(
  47.     'python2: for Python2 bindings'
  48. @@ -21,6 +22,7 @@ options=('!strip')
  49.  _basename="cplex_studio${pkgver//./}.linux-${arch/_/-}"
  50.  _installer="${_basename}.bin"
  51.  _archdir="${arch/_/-}_linux"
  52. +_python_min_version=$(python --version | awk '{ print $2 }' | awk -F "." '{ print $2 }')
  53.  
  54.  source=("file://${_installer}" installer.properties.template)
  55.  
  56. @@ -39,17 +41,43 @@ prepare() {
  57.  package() {
  58.     cd "${srcdir}/${_basename}"
  59.  
  60. -   # Install binaries.
  61. +   ### Install binaries:
  62. +
  63. +   # Cplex main exe.
  64.     install -Dm755 "./cplex/bin/${_archdir}/cplex" "${pkgdir}/usr/bin/cplex"
  65. +
  66. +   # Cplex AMPL.
  67.     install -Dm755 "./cplex/bin/${_archdir}/cplexamp" "${pkgdir}/usr/bin/cplexamp"
  68.  
  69. -   # Install library files.
  70. +   # Cplex Constraint Optimizer.
  71. +   install -Dm755 "./cpoptimizer/bin/${_archdir}/cpoptimizer" "${pkgdir}/usr/bin/cpoptimizer"
  72. +
  73. +   ### Install library files:
  74.     install -dm755 "${pkgdir}/usr/lib"
  75. -   install -m755  "./cplex/bin/${_archdir}/"*.so "${pkgdir}/usr/lib/"
  76.  
  77. -   # Install C headers.
  78. +   # Cplex libraries.
  79. +   install -m755  "./cplex/lib/${_archdir}/static_pic/"*.a "${pkgdir}/usr/lib"
  80. +
  81. +   # Concert libraries.
  82. +   install -m755 "./concert/lib/${_archdir}/static_pic/"*.a "${pkgdir}/usr/lib"
  83. +
  84. +   # Constraint Optimizer libraries.
  85. +   install -m755 "./cpoptimizer/lib/${_archdir}/static_pic/"*.a "${pkgdir}/usr/lib"
  86. +
  87. +   ### Install C/C++ headers:
  88.     install -dm755 "${pkgdir}/usr/include"
  89. -   install -m755  "./cplex/include/ilcplex/"*.h "${pkgdir}/usr/include/"
  90. +
  91. +   # Cplex headers.
  92. +   install -dm755 "${pkgdir}/usr/include/ilcplex"
  93. +   install -m755  "./cplex/include/ilcplex/"*.h "${pkgdir}/usr/include/ilcplex"
  94. +
  95. +   # Concert headers.
  96. +   install -dm755 "${pkgdir}/usr/include/ilconcert"
  97. +   install -m755 "./concert/include/ilconcert/"*.h "${pkgdir}/usr/include/ilconcert"
  98. +
  99. +   # Constraint Optimizer headers.
  100. +   install -dm755 "${pkgdir}/usr/include/ilcp"
  101. +   install -m755 "./cpoptimizer/include/ilcp/"*.h "${pkgdir}/usr/include/ilcp"
  102.  
  103.     # Install Python2 bindings.
  104.     cd "./cplex/python/2.7/${_archdir}/"
  105. @@ -57,13 +85,27 @@ package() {
  106.     cd "../../../../"
  107.  
  108.     # Install Python bindings.
  109. -   cd "./cplex/python/3.6/${_archdir}/"
  110. -   python3 setup.py install --root="${pkgdir}/" --optimize=1
  111. -   cd "../../../../"
  112. -
  113. -   # Install documentation.
  114. +   if [[ "${_python_min_version}" > 6 ]]; then
  115. +       echo -ne "\033[0;31m\033[1mWARNING\033[0m "
  116. +       echo "Skipping the installation of Python bindings."
  117. +       echo "CPLEX 12.8.0 only supports Python 3.5 and 3.6; later versions of Python are not supported."
  118. +       echo "Downgrade to Python 3.6 if you need Python bindings."
  119. +   else
  120. +       cd "./cplex/python/3.7/${_archdir}/"
  121. +       python3 setup.py install --root="${pkgdir}/" --optimize=1
  122. +       cd "../../../../"
  123. +   fi
  124. +
  125. +   # Install license.
  126.     install -dm755 "${pkgdir}/usr/share/licenses/cplex"
  127.     install -m644  "./license/"*.txt "${pkgdir}/usr/share/licenses/cplex/"
  128. +
  129. +   # Install documentation and examples.
  130. +   install -dm755 "${pkgdir}/usr/share/doc/cplex/"{html,examples/{cplex,cpoptimizer}}
  131. +   cp -R ./doc/html/* "${pkgdir}/usr/share/doc/cplex/html"
  132. +   cp -R ./cplex/examples/{src,data} "${pkgdir}/usr/share/doc/cplex/examples/cplex"
  133. +   cp -R ./cpoptimizer/examples/{src,data,tutorial} "${pkgdir}/usr/share/doc/cplex/examples/cpoptimizer"
  134. +   chmod -R 644 "${pkgdir}/usr/share/doc/cplex"
  135.  }
  136.  
  137.  md5sums=('1cb4b29131433491a95efd73b145b821'
  138. --
  139. 2.18.0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top