1 |
%define epoch 0 |
2 |
|
3 |
%define name amd |
4 |
%define NAME AMD |
5 |
%define version 2.2.2 |
6 |
%define release %mkrel 1 |
7 |
%define major %{version} |
8 |
%define libname %mklibname %{name} %{major} |
9 |
%define develname %mklibname %{name} -d |
10 |
|
11 |
Name: %{name} |
12 |
Version: %{version} |
13 |
Release: %{release} |
14 |
Epoch: %{epoch} |
15 |
Summary: Routines for permuting sparse matricies prior to factorization |
16 |
Group: System/Libraries |
17 |
License: LGPL |
18 |
URL: http://www.cise.ufl.edu/research/sparse/amd/ |
19 |
Source0: http://www.cise.ufl.edu/research/sparse/amd/%{NAME}-%{version}.tar.gz |
20 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
21 |
BuildRequires: suitesparse-common-devel >= 3.2.0-2 |
22 |
|
23 |
%description |
24 |
AMD provides a set of routines for permuting sparse matricies prior to |
25 |
Cholesky factorization (or LU factorization with diagonal pivoting). |
26 |
|
27 |
%package -n %{libname} |
28 |
Summary: Library of routines for permuting sparse matricies prior to factorization |
29 |
Group: System/Libraries |
30 |
Provides: %{libname} = %{epoch}:%{version}-%{release} |
31 |
Obsoletes: %mklibname %{name} 2 |
32 |
|
33 |
%description -n %{libname} |
34 |
AMD provides a set of routines for permuting sparse matricies prior to |
35 |
Cholesky factorization (or LU factorization with diagonal pivoting). |
36 |
|
37 |
This package contains the library needed to run programs dynamically |
38 |
linked against %{NAME}. |
39 |
|
40 |
%package -n %{develname} |
41 |
Summary: C routines for permuting sparse matricies prior to factorization |
42 |
Group: Development/C |
43 |
Requires: suitesparse-common-devel >= 3.0.0 |
44 |
Requires: %{libname} = %{epoch}:%{version}-%{release} |
45 |
Provides: %{name}-devel = %{epoch}:%{version}-%{release} |
46 |
Obsoletes: %mklibname %{name} 1.2 -d |
47 |
Obsoletes: %mklibname %{name} 2 -d |
48 |
Obsoletes: %mklibname %{name} 2 -d -s |
49 |
|
50 |
%description -n %{develname} |
51 |
AMD provides a set of routines for permuting sparse matricies prior to |
52 |
Cholesky factorization (or LU factorization with diagonal pivoting). |
53 |
|
54 |
This package contains the files needed to develop applications that |
55 |
use %{NAME}. |
56 |
|
57 |
%prep |
58 |
%setup -q -c |
59 |
%setup -q -D -n %{name}-%{version}/%{NAME} |
60 |
mkdir ../UFconfig |
61 |
ln -sf %{_includedir}/suitesparse/UFconfig.* ../UFconfig |
62 |
|
63 |
%build |
64 |
pushd Lib |
65 |
%make -f GNUmakefile CC=%__cc CFLAGS="%{optflags} -fPIC -I%{_includedir}/suitesparse" INC= |
66 |
%__cc -shared -Wl,-soname,lib%{name}.so.%{major} -o lib%{name}.so.%{version} -lm *.o |
67 |
popd |
68 |
|
69 |
%install |
70 |
%__rm -rf %{buildroot} |
71 |
|
72 |
%__install -d -m 755 %{buildroot}%{_libdir} |
73 |
%__install -d -m 755 %{buildroot}%{_includedir}/suitesparse |
74 |
|
75 |
for f in Lib/*.so*; do |
76 |
%__install -m 755 $f %{buildroot}%{_libdir}/`basename $f` |
77 |
done |
78 |
for f in Lib/*.a; do |
79 |
%__install -m 644 $f %{buildroot}%{_libdir}/`basename $f` |
80 |
done |
81 |
for f in Include/*.h; do |
82 |
%__install -m 644 $f %{buildroot}%{_includedir}/suitesparse/`basename $f` |
83 |
done |
84 |
|
85 |
%__ln_s lib%{name}.so.%{version} %{buildroot}%{_libdir}/lib%{name}.so |
86 |
|
87 |
%__install -d -m 755 %{buildroot}%{_docdir}/%{name} |
88 |
%__install -m 644 README.txt Doc/*.txt Doc/*.pdf Doc/ChangeLog Doc/License %{buildroot}%{_docdir}/%{name} |
89 |
|
90 |
%clean |
91 |
%__rm -rf %{buildroot} |
92 |
|
93 |
%if %mdkversion < 200900 |
94 |
%post -n %{libname} -p /sbin/ldconfig |
95 |
%endif |
96 |
|
97 |
%if %mdkversion < 200900 |
98 |
%postun -n %{libname} -p /sbin/ldconfig |
99 |
%endif |
100 |
|
101 |
%files -n %{libname} |
102 |
%defattr(-,root,root) |
103 |
%attr(755,root,root) %{_libdir}/*.so.* |
104 |
|
105 |
%files -n %{develname} |
106 |
%defattr(-,root,root) |
107 |
%{_docdir}/%{name} |
108 |
%{_includedir}/suitesparse/*.h |
109 |
%{_libdir}/*.so |
110 |
%{_libdir}/*.a |
111 |
|
112 |
|
113 |
|