]> git.pld-linux.org Git - packages/lp_solve.git/blob - lp_solve.spec
- better URL
[packages/lp_solve.git] / lp_solve.spec
1 # TODO
2 # - update -pl
3 %define         _ver_major      5.5
4 %define         _ver_minor      0.10
5 Summary:        Mixed Integer Linear Program solver
6 Summary(pl.UTF-8):      Biblioteka i narzędzie do rozwiązywania problemu programowania liniowego
7 Name:           lp_solve
8 Version:        %{_ver_major}.%{_ver_minor}
9 Release:        0.3
10 License:        LGPL
11 Group:          Libraries
12 Source0:        http://dl.sourceforge.net/lpsolve/%{name}_%{version}_source.tar.gz
13 # Source0-md5:  26b3e95ddf3d9c077c480ea45874b3b8
14 Patch0:         %{name}-shared.patch
15 URL:            http://lpsolve.sourceforge.net/5.5/
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 Biblioteka i narzędzie do rozwiązywania problemu programowania
45 liniowego przy użyciu algorytmu Simplex.
46
47 %package devel
48 Summary:        liblpsolve header files
49 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki liblpsolve
50 Group:          Development/Libraries
51 Requires:       %{name} = %{version}-%{release}
52
53 %description devel
54 liblpsolve header files.
55
56 %description devel -l pl.UTF-8
57 Pliki nagłówkowe biblioteki liblpsolve.
58
59 %package static
60 Summary:        Static liblpsolve library
61 Summary(pl.UTF-8):      Statyczna biblioteka liblpsolve
62 Group:          Development/Libraries
63 Requires:       %{name}-devel = %{version}-%{release}
64
65 %description static
66 Static liblpsolve library.
67
68 %description static -l pl.UTF-8
69 Statyczna biblioteka liblpsolve.
70
71 %prep
72 %setup -q -n %{name}_%{_ver_major}
73 %patch0 -p1
74
75 %build
76 cd lpsolve55
77 CC="%{__cc}" CFLAGS="%{rpmcflags}" sh -x ccc
78 cd ../lp_solve
79 CC="%{__cc}" CFLAGS="%{rpmcflags}" sh -x ccc
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/lpsolve}
84
85 install lp_solve/lp_solve $RPM_BUILD_ROOT%{_bindir}/lpsolve
86 install lpsolve55/liblpsolve55.a $RPM_BUILD_ROOT%{_libdir}/liblpsolve.a
87 install lpsolve55/liblpsolve55.so $RPM_BUILD_ROOT%{_libdir}/liblpsolve.so
88 cp -a lp*.h $RPM_BUILD_ROOT%{_includedir}/lpsolve
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %post   -p /sbin/ldconfig
94 %postun -p /sbin/ldconfig
95
96 %files
97 %defattr(644,root,root,755)
98 %doc README.txt
99 %attr(755,root,root) %{_bindir}/lpsolve
100 %attr(755,root,root) %{_libdir}/liblpsolve.so
101
102 %files devel
103 %defattr(644,root,root,755)
104 %{_includedir}/lpsolve
105
106 %files static
107 %defattr(644,root,root,755)
108 %{_libdir}/liblpsolve.a
This page took 0.078826 seconds and 4 git commands to generate.