lpsolve.spec 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ##
  2. ## lpsolve.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_major 5.5
  25. %define V_minor 0.15
  26. # package information
  27. Name: lpsolve
  28. Summary: Mixed-Integer Linear Programming (LP) Solver
  29. URL: http://lpsolve.sourceforge.net/
  30. Vendor: Peter Notebaert & Kjell Eikland
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Algorithm
  35. License: LGPL
  36. Version: %{V_major}.%{V_minor}
  37. Release: 20090910
  38. # list of sources
  39. Source0: http://switch.dl.sourceforge.net/lpsolve/lp_solve_%{version}_source.tar.gz
  40. Patch0: lpsolve.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  45. PreReq: OpenPKG, openpkg >= 20040130
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. lp_solve is a free linear integer programming solver based on the
  50. revised Simplex method and the Branch-and-Bound method for the
  51. integers. lp_solve solves pure linear, (mixed) integer/binary,
  52. semi-continuous and special ordered sets (SOS) models.
  53. %track
  54. prog lpsolve = {
  55. version = %{version}
  56. url = http://sourceforge.net/projects/lpsolve/files/
  57. regex = lp_solve_(__VER__)_source\.tar\.gz
  58. }
  59. %prep
  60. %setup -q -n lp_solve_%{V_major}
  61. %patch -p0
  62. %build
  63. ( cd lpsolve55; sh -x ccc ) || exit $?
  64. ( cd lp_solve; sh -x ccc ) || exit $?
  65. %install
  66. rm -rf $RPM_BUILD_ROOT
  67. %{l_shtool} mkdir -f -p -m 755 \
  68. $RPM_BUILD_ROOT%{l_prefix}/bin \
  69. $RPM_BUILD_ROOT%{l_prefix}/include/lpsolve \
  70. $RPM_BUILD_ROOT%{l_prefix}/lib
  71. %{l_shtool} install -c -s -m 755 \
  72. lp_solve/bin/*/lp_solve $RPM_BUILD_ROOT%{l_prefix}/bin/lpsolve
  73. %{l_shtool} install -c -m 644 \
  74. lpsolve55/bin/*/liblpsolve55.a $RPM_BUILD_ROOT%{l_prefix}/lib/liblpsolve.a
  75. %{l_shtool} install -c -m 644 \
  76. lp*.h $RPM_BUILD_ROOT%{l_prefix}/include/lpsolve/
  77. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  78. %files -f files
  79. %clean
  80. rm -rf $RPM_BUILD_ROOT