]>
Commit | Line | Data |
---|---|---|
7439d5ac JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with metis # build with metis lib | |
4 | # | |
5 | Summary: CHOLMOD: sparse supernodal Cholesky factorization and update/downdate | |
6 | Name: CHOLMOD | |
7 | Version: 1.6.0 | |
8 | Release: 1 | |
9 | License: LGPL | |
10 | Group: Libraries | |
11 | Source0: http://www.cise.ufl.edu/research/sparse/cholmod/%{name}-%{version}.tar.gz | |
12 | # Source0-md5: d07af9879992e597fb197daaefd2eb19 | |
13 | Patch0: %{name}-ufconfig.patch | |
14 | Patch1: %{name}-shared.patch | |
15 | URL: http://www.cise.ufl.edu/research/sparse/cholmod/ | |
16 | BuildRequires: blas-devel | |
17 | BuildRequires: CCOLAMD-devel | |
18 | BuildRequires: AMD-devel | |
19 | BuildRequires: CAMD-devel | |
20 | BuildRequires: COLAMD-devel | |
21 | BuildRequires: lapack-devel | |
22 | BuildRequires: libtool >= 2:1.5 | |
23 | %{?with_metis:BuildRequires: metis-devel} | |
24 | BuildRequires: UFconfig | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | CHOLMOD is a set of ANSI C routines for sparse Cholesky | |
29 | factorization and update/downdate. | |
30 | ||
31 | %package devel | |
32 | Summary: Header files for cholmod library | |
33 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cholmod | |
34 | Group: Development/Libraries | |
35 | Requires: %{name} = %{version}-%{release} | |
36 | Requires: UFconfig | |
37 | ||
38 | %description devel | |
39 | Header files for cholmod library. | |
40 | ||
41 | %description devel -l pl.UTF-8 | |
42 | Pliki nagłówkowe biblioteki cholmod. | |
43 | ||
44 | %package static | |
45 | Summary: Static cholmod library | |
46 | Summary(pl.UTF-8): Statyczna biblioteka cholmod | |
47 | Group: Development/Libraries | |
48 | Requires: %{name}-devel = %{version}-%{release} | |
49 | ||
50 | %description static | |
51 | Static cholmod library. | |
52 | ||
53 | %description static -l pl.UTF-8 | |
54 | Statyczna biblioteka cholmod. | |
55 | ||
56 | %prep | |
57 | %setup -q -n %{name} | |
58 | %patch0 -p1 | |
59 | %patch1 -p1 | |
60 | ||
61 | %build | |
62 | %{__make} \ | |
63 | CC="%{__cc}" \ | |
64 | %if %{with metis} | |
65 | CFLAGS="%{rpmcflags} -fPIC" \ | |
66 | %else | |
67 | CFLAGS="%{rpmcflags} -fPIC -DNPARTITION" \ | |
68 | METIS= \ | |
69 | %endif | |
70 | libdir=%{_libdir} | |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | install -d $RPM_BUILD_ROOT%{_includedir} | |
75 | ||
76 | %{__make} -C Lib install \ | |
77 | DESTDIR=$RPM_BUILD_ROOT \ | |
78 | libdir=%{_libdir} | |
79 | ||
80 | install Include/*.h $RPM_BUILD_ROOT%{_includedir} | |
81 | ||
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %post -p /sbin/ldconfig | |
86 | %postun -p /sbin/ldconfig | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
90 | %doc README.txt Doc/UserGuide.pdf | |
91 | %attr(755,root,root) %{_libdir}/libcholmod.so.*.*.* | |
92 | ||
93 | %files devel | |
94 | %defattr(644,root,root,755) | |
95 | %attr(755,root,root) %{_libdir}/libcholmod.so | |
96 | %{_libdir}/libcholmod.la | |
97 | %{_includedir}/*.h | |
98 | ||
99 | %files static | |
100 | %defattr(644,root,root,755) | |
101 | %{_libdir}/libcholmod.a |