]> git.pld-linux.org Git - packages/lp_solve.git/blob - lp_solve.spec
a4e68aa03376178d4cf27d53c20952c08c363181
[packages/lp_solve.git] / lp_solve.spec
1 %define         _ver_major      5.5
2 %define         _ver_minor      2.3
3 Summary:        Mixed Integer Linear Program solver
4 Summary(pl.UTF-8):      Biblioteka i narzędzie do rozwiązywania problemu programowania liniowego
5 Name:           lp_solve
6 Version:        %{_ver_major}.%{_ver_minor}
7 Release:        1
8 License:        LGPL
9 Group:          Libraries
10 Source0:        http://downloads.sourceforge.net/lpsolve/%{name}_%{version}_source.tar.gz
11 # Source0-md5:  695d0bc15519a10604493ace65d16d24
12 Patch0:         %{name}-shared.patch
13 Patch1:         %{name}-define.patch
14 URL:            http://lpsolve.sourceforge.net/5.5/
15 BuildRequires:  COLAMD-devel
16 BuildRequires:  bison
17 BuildRequires:  flex
18 BuildRequires:  libtool
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 The linear programming (LP) problem can be formulated as: Solve A.x >=
23 V1, with V2.x maximal. A is a matrix, x is a vector of (nonnegative)
24 variables, V1 is a vector called the right hand side, and V2 is a
25 vector specifying the objective function.
26
27 An integer linear programming (ILP) problem is an LP with the
28 constraint that all the variables are integers. In a mixed integer
29 linear programming (MILP) problem, some of the variables are integer
30 and others are real.
31
32 The program lp_solve solves LP, ILP, and MILP problems. It is slightly
33 more general than suggested above, in that every row of A (specifying
34 one constraint) can have its own (in)equality, <=, >= or =. The result
35 specifies values for all variables.
36
37 lp_solve uses the 'Simplex' algorithm and sparse matrix methods for
38 pure LP problems. If one or more of the variables is declared integer,
39 the Simplex algorithm is iterated with a branch and bound algorithm,
40 until the desired optimal solution is found. lp_solve can read MPS
41 format input files.
42
43 %description -l pl.UTF-8
44 Problem programowania liniowego (LP - Linear Programming) można
45 określić następująco: rozwiązać A.x >= V1 z maksymalnym V2.x. A jest
46 macierzą. x jest wektorem (nieujemnych) zmiennych, V1 jest wektorem
47 zwanym prawą stroną, a V2 jest wektorem określającym funkcję celu.
48
49 Problem całkowitoliczbowego programowania liniowego (ILP - Integer LP)
50 LP z ograniczeniem zmiennych do liczb całkowitych. Problem mieszanego
51 całkowitoliczbowego programowania liniowego (MILP - Mixed ILP) dotyczy
52 sytuacji kiedy część zmiennych jest całkowita, a reszta rzeczywista.
53
54 Program lp_solve rozwiązuje problemy LP, ILP i MILP. Jest nieco
55 bardziej ogólny niż napisano powyżej, ponieważ każdy wiersz A
56 (określający jedno ograniczenie) może mieć własną (nie)równość: <=, >=
57 lub =. Wynik określa wartości wszystkich zmiennych.
58
59 lp_solve używa algorytmu "Simplex" i metod dla macierzy rzadkich do
60 zwykłych problemów LP. Jeśli jedna lub więcej zmiennych zostanie
61 określona jako całkowita, algorytm Simplex jest iterowany algorytmem
62 "branch and bound" do osiągnięcia pożądanego optymalnego rozwiązania.
63 lp_solve potrafi czytać pliki wejściowe w formacie MPS.
64
65 %package devel
66 Summary:        liblpsolve header files
67 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki liblpsolve
68 Group:          Development/Libraries
69 Requires:       %{name} = %{version}-%{release}
70
71 %description devel
72 liblpsolve header files.
73
74 %description devel -l pl.UTF-8
75 Pliki nagłówkowe biblioteki liblpsolve.
76
77 %package static
78 Summary:        Static liblpsolve library
79 Summary(pl.UTF-8):      Statyczna biblioteka liblpsolve
80 Group:          Development/Libraries
81 Requires:       %{name}-devel = %{version}-%{release}
82
83 %description static
84 Static liblpsolve library.
85
86 %description static -l pl.UTF-8
87 Statyczna biblioteka liblpsolve.
88
89 %prep
90 %setup -q -n %{name}_%{_ver_major}
91 %patch0 -p1
92 %patch1 -p1
93
94 %{__rm} -r colamd
95
96 %build
97 cd lpsolve55
98 CC="%{__cc}" CFLAGS="%{rpmcflags} %{rpmcppflags} -I/usr/include/colamd" sh -x ccc
99 cd ../lp_solve
100 CC="%{__cc}" CFLAGS="%{rpmcflags} %{rpmcppflags} -I/usr/include/colamd" sh -x ccc
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/lpsolve}
105
106 install lp_solve/bin/ux*/lp_solve $RPM_BUILD_ROOT%{_bindir}/lpsolve
107 install lpsolve55/bin/ux*/liblpsolve55.a $RPM_BUILD_ROOT%{_libdir}/liblpsolve.a
108 install lpsolve55/bin/ux*/liblpsolve55.so $RPM_BUILD_ROOT%{_libdir}
109 ln -sf liblpsolve55.so $RPM_BUILD_ROOT%{_libdir}/liblpsolve.so
110 cp -a lp*.h $RPM_BUILD_ROOT%{_includedir}/lpsolve
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %post   -p /sbin/ldconfig
116 %postun -p /sbin/ldconfig
117
118 %files
119 %defattr(644,root,root,755)
120 %doc README.txt
121 %attr(755,root,root) %{_bindir}/lpsolve
122 %attr(755,root,root) %{_libdir}/liblpsolve55.so
123
124 %files devel
125 %defattr(644,root,root,755)
126 %attr(755,root,root) %{_libdir}/liblpsolve.so
127 %{_includedir}/lpsolve
128
129 %files static
130 %defattr(644,root,root,755)
131 %{_libdir}/liblpsolve.a
This page took 0.069319 seconds and 2 git commands to generate.